about summary refs log tree commit diff
path: root/src/game/client/components/menus_demo.cpp
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/client/components/menus_demo.cpp
parentc3966413e9f9c612fb26cfb2d0a20d85aa136df9 (diff)
downloadzcatch-7414271309433d7501fb6d7731ee3dd38df72dd1.tar.gz
zcatch-7414271309433d7501fb6d7731ee3dd38df72dd1.zip
check the return values of RemoveFile and CreateFolder
Diffstat (limited to 'src/game/client/components/menus_demo.cpp')
-rw-r--r--src/game/client/components/menus_demo.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/game/client/components/menus_demo.cpp b/src/game/client/components/menus_demo.cpp
index a96659d8..7d7e2903 100644
--- a/src/game/client/components/menus_demo.cpp
+++ b/src/game/client/components/menus_demo.cpp
@@ -484,9 +484,11 @@ void CMenus::RenderDemoList(CUIRect MainView)
 		{
 			char aBuf[512];
 			str_format(aBuf, sizeof(aBuf), "%s/%s", m_aCurrentDemoFolder, m_lDemos[m_DemolistSelectedIndex].m_aFilename);
-			Storage()->RemoveFile(aBuf, m_lDemos[m_DemolistSelectedIndex].m_StorageType);
-			DemolistPopulate();
-			DemolistOnUpdate(false);
+			if(Storage()->RemoveFile(aBuf, m_lDemos[m_DemolistSelectedIndex].m_StorageType))
+			{
+				DemolistPopulate();
+				DemolistOnUpdate(false);
+			}
 		}
 		m_DemolistDelEntry = false;
 	}