diff options
author | Max Horn | 2007-01-21 16:34:18 +0000 |
---|---|---|
committer | Max Horn | 2007-01-21 16:34:18 +0000 |
commit | 0a9276092fbd946f82a2ea7440d68f2fdaf33cc3 (patch) | |
tree | 519f455578c2cdffcb2346de70a59e866e643b23 | |
parent | fef501c20509d7a74f4ee53abd2557be533c75e7 (diff) | |
download | scummvm-rg350-0a9276092fbd946f82a2ea7440d68f2fdaf33cc3.tar.gz scummvm-rg350-0a9276092fbd946f82a2ea7440d68f2fdaf33cc3.tar.bz2 scummvm-rg350-0a9276092fbd946f82a2ea7440d68f2fdaf33cc3.zip |
Fix crash in GameDescriptor::updateDesc
svn-id: r25153
-rw-r--r-- | base/game.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/base/game.h b/base/game.h index 1f45af259c..bf83a6eee0 100644 --- a/base/game.h +++ b/base/game.h @@ -60,8 +60,8 @@ public: Common::String &gameid() { return getVal("gameid"); } Common::String &description() { return getVal("description"); } - Common::Language language() const { return Common::parseLanguage(getVal("language")); } - Common::Platform platform() const { return Common::parsePlatform(getVal("platform")); } + Common::Language language() const { return contains("language") ? Common::parseLanguage(getVal("language")) : Common::UNK_LANG; } + Common::Platform platform() const { return contains("platform") ? Common::parsePlatform(getVal("platform")) : Common::kPlatformUnknown; } }; /** List of games. */ |