aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorBertrand Augereau2015-11-09 23:56:10 +0100
committerBertrand Augereau2015-11-09 23:57:36 +0100
commit91e6abd3050ed028bab3fd4d1746adb79fe8adcd (patch)
treeb4d6df28667eca030a4991a0fe88ab59d6102e87 /gui
parent06d83f148f8167fbe3e7c671a91f69e36decf1fe (diff)
downloadscummvm-rg350-91e6abd3050ed028bab3fd4d1746adb79fe8adcd.tar.gz
scummvm-rg350-91e6abd3050ed028bab3fd4d1746adb79fe8adcd.tar.bz2
scummvm-rg350-91e6abd3050ed028bab3fd4d1746adb79fe8adcd.zip
GUI: Use after free
Diffstat (limited to 'gui')
-rw-r--r--gui/ThemeEngine.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index 6c40001b26..6562a1d922 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -757,8 +757,6 @@ bool ThemeEngine::loadDefaultXML() {
return false;
}
- free(tmpXML);
-
_themeName = "ScummVM Classic Theme (Builtin Version)";
_themeId = "builtin";
_themeFile.clear();
@@ -766,6 +764,8 @@ bool ThemeEngine::loadDefaultXML() {
bool result = _parser->parse();
_parser->close();
+ free(tmpXML);
+
return result;
#else
warning("The built-in theme is not enabled in the current build. Please load an external theme");