aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicent Marti2008-10-18 23:58:26 +0000
committerVicent Marti2008-10-18 23:58:26 +0000
commit98ae4615561a318f6ce5d85ef13d84d3bf9d731f (patch)
treed86c311a4e673d43dcc96ea1f0105354825c49c2
parent2f92b31235350cb7b08a2a2b3c8704f485d0ea88 (diff)
downloadscummvm-rg350-98ae4615561a318f6ce5d85ef13d84d3bf9d731f.tar.gz
scummvm-rg350-98ae4615561a318f6ce5d85ef13d84d3bf9d731f.tar.bz2
scummvm-rg350-98ae4615561a318f6ce5d85ef13d84d3bf9d731f.zip
Fixed: Assert when parsing a corrupted Theme archive (now discarding the theme silently as non-valid).
svn-id: r34825
-rw-r--r--gui/theme.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/gui/theme.cpp b/gui/theme.cpp
index 1c8798e472..1387eb94ea 100644
--- a/gui/theme.cpp
+++ b/gui/theme.cpp
@@ -132,6 +132,9 @@ bool Theme::isThemeLoadingRequired() {
bool Theme::themeConfigParseHeader(Common::String header, Common::String &themeName) {
header.trim();
+ if (header.empty())
+ return false;
+
if (header[0] != '[' || header.lastChar() != ']')
return false;