about summary refs log tree commit diff
path: root/src/game/editor
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2010-12-07 23:47:41 +0100
committeroy <Tom_Adams@web.de>2010-12-07 23:47:41 +0100
commit7414271309433d7501fb6d7731ee3dd38df72dd1 (patch)
treeaf89498a7d7562c75d11b920e4f66c4b99d235fb /src/game/editor
parentc3966413e9f9c612fb26cfb2d0a20d85aa136df9 (diff)
downloadzcatch-7414271309433d7501fb6d7731ee3dd38df72dd1.tar.gz
zcatch-7414271309433d7501fb6d7731ee3dd38df72dd1.zip
check the return values of RemoveFile and CreateFolder
Diffstat (limited to 'src/game/editor')
-rw-r--r--src/game/editor/ed_editor.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/game/editor/ed_editor.cpp b/src/game/editor/ed_editor.cpp
index c59c1ff4..bb9a1721 100644
--- a/src/game/editor/ed_editor.cpp
+++ b/src/game/editor/ed_editor.cpp
@@ -2359,12 +2359,14 @@ void CEditor::RenderFileDialog()
 			{
 				char aBuf[512];
 				str_format(aBuf, sizeof(aBuf), "%s/%s", m_pFileDialogPath, m_aFileDialogFileName);
-				Storage()->CreateFolder(aBuf, IStorage::TYPE_SAVE);
-				FilelistPopulate(IStorage::TYPE_SAVE);
-				if(m_FilesSelectedIndex >= 0 && !m_FileList[m_FilesSelectedIndex].m_IsDir)
-					str_copy(m_aFileDialogFileName, m_FileList[m_FilesSelectedIndex].m_aFilename, sizeof(m_aFileDialogFileName));
-				else
-					m_aFileDialogFileName[0] = 0;
+				if(Storage()->CreateFolder(aBuf, IStorage::TYPE_SAVE))
+				{
+					FilelistPopulate(IStorage::TYPE_SAVE);
+					if(m_FilesSelectedIndex >= 0 && !m_FileList[m_FilesSelectedIndex].m_IsDir)
+						str_copy(m_aFileDialogFileName, m_FileList[m_FilesSelectedIndex].m_aFilename, sizeof(m_aFileDialogFileName));
+					else
+						m_aFileDialogFileName[0] = 0;
+				}
 			}
 		}
 	}