diff options
| author | oy <Tom_Adams@web.de> | 2010-12-07 23:47:41 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2010-12-07 23:47:41 +0100 |
| commit | 7414271309433d7501fb6d7731ee3dd38df72dd1 (patch) | |
| tree | af89498a7d7562c75d11b920e4f66c4b99d235fb /src/game/client/components/menus_demo.cpp | |
| parent | c3966413e9f9c612fb26cfb2d0a20d85aa136df9 (diff) | |
| download | zcatch-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.cpp | 8 |
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; } |