From 5a29aa8812ca523f79a5ca5b492862762dbd19e4 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sun, 11 Nov 2018 08:16:11 +0000 Subject: 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. --- engines/advancedDetector.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'engines/advancedDetector.cpp') 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; } -- cgit v1.2.3