From 7414271309433d7501fb6d7731ee3dd38df72dd1 Mon Sep 17 00:00:00 2001 From: oy Date: Tue, 7 Dec 2010 23:47:41 +0100 Subject: check the return values of RemoveFile and CreateFolder --- src/game/client/components/menus_demo.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/game/client/components/menus_demo.cpp') 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; } -- cgit 1.4.1