diff options
author | D G Turner | 2018-11-11 08:16:11 +0000 |
---|---|---|
committer | D G Turner | 2018-11-11 08:16:11 +0000 |
commit | 5a29aa8812ca523f79a5ca5b492862762dbd19e4 (patch) | |
tree | 3477bcd3c89394918ff330e0fc456489da8145ef /engines/advancedDetector.cpp | |
parent | 3f99c2c9dd8f92c8f8925f5824c6f69fe7c2305f (diff) | |
download | scummvm-rg350-5a29aa8812ca523f79a5ca5b492862762dbd19e4.tar.gz scummvm-rg350-5a29aa8812ca523f79a5ca5b492862762dbd19e4.tar.bz2 scummvm-rg350-5a29aa8812ca523f79a5ca5b492862762dbd19e4.zip |
ENGINES: Fix Crash in Fallback Detector Game Title Naming.
This is a regression from 90b78c544657bf0fc41d6b86276a0873060345b5
This commit restores the previous behaviour and avoids a null
pointer dereference induced crash.
This fixes the root cause of bug Trac #10515.
Diffstat (limited to 'engines/advancedDetector.cpp')
-rw-r--r-- | engines/advancedDetector.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp index 6f4efcfb57..26b06b6417 100644 --- a/engines/advancedDetector.cpp +++ b/engines/advancedDetector.cpp @@ -91,7 +91,11 @@ DetectedGame AdvancedMetaEngine::toDetectedGame(const ADDetectedGame &adGame) co extra = ""; } else { const PlainGameDescriptor *pgd = findPlainGameDescriptor(desc->gameId, _gameIds); - title = pgd->description; + if (pgd) { + title = pgd->description; + } else { + title = ""; + } extra = desc->extra; } |