From 8f9927608b1041dc66c056f0e388cb559164a70e Mon Sep 17 00:00:00 2001 From: Thanasis Antoniou Date: Sun, 28 Jul 2019 20:43:20 +0300 Subject: BLADERUNNER: prevent seg fault when opening KIA Only if a restored content save was loaded in original game mode --- engines/bladerunner/ui/kia.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'engines') diff --git a/engines/bladerunner/ui/kia.cpp b/engines/bladerunner/ui/kia.cpp index b312a0355c..6980544fa8 100644 --- a/engines/bladerunner/ui/kia.cpp +++ b/engines/bladerunner/ui/kia.cpp @@ -91,11 +91,10 @@ KIA::KIA(BladeRunnerEngine *vm) { _pogoPos = 0; - if (_vm->_cutContent) { - _buttons = new UIImagePicker(_vm, 23); // add description box for objects - } else { - _buttons = new UIImagePicker(_vm, 22); - } + // original imageCount was 22. We add +1 to have a description box for objects in cut content + // We don't have separated cases here, for _vm->_cutContent since that causes assertion fault if + // loading a "restoed content" save game in a "original game" version + _buttons = new UIImagePicker(_vm, 23); _crimesSection = new KIASectionCrimes(_vm, _vm->_playerActor->_clues); _suspectsSection = new KIASectionSuspects(_vm, _vm->_playerActor->_clues); -- cgit v1.2.3