diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/ThemeEngine.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 13fd1ea24d..2df6b5ec47 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -525,7 +525,8 @@ bool ThemeEngine::loadThemeXML(const Common::String &themeName) { if (!node.exists() || !node.isReadable()) return false; - Common::Archive *archive; + // FIXME: Should this be initialized to something else than NULL? + Common::Archive *archive = NULL; if (node.getName().hasSuffix(".zip") && !node.isDirectory()) { #ifdef USE_ZLIB @@ -544,6 +545,8 @@ bool ThemeEngine::loadThemeXML(const Common::String &themeName) { } Common::File themercFile; + // FIXME: Possibly dereferencing a NULL pointer here if the node's + // name doesn't have a ".zip" suffix and the node is not a directory. themercFile.open("THEMERC", *archive); if (!themercFile.isOpen()) { delete archive; |