[Scummvm-git-logs] scummvm master -> f07c27d172218b822a17ae1834a9ec609e6a3791

antoniou79 a.antoniou79 at gmail.com
Thu Mar 5 19:29:37 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
f07c27d172 BLADERUNNER: Fix segmentation fault when missing files


Commit: f07c27d172218b822a17ae1834a9ec609e6a3791
    https://github.com/scummvm/scummvm/commit/f07c27d172218b822a17ae1834a9ec609e6a3791
Author: Thanasis Antoniou (a.antoniou79 at gmail.com)
Date: 2020-03-05T21:26:28+02:00

Commit Message:
BLADERUNNER: Fix segmentation fault when missing files

Cause was deleting _shapes without _shapes being initialized to nullptr

Error occured when Bladerunner engine exited early due to missing data files. In this case the _shapes is not yet initialized, yet its deletion was calling the Shapes destruction and the array clear function leading to a segmentaiton fault. To reproduce just remove or rename one of the required files for BladeRunner and run the game (the error might not be triggered the first time).

Changed paths:
    engines/bladerunner/bladerunner.cpp


diff --git a/engines/bladerunner/bladerunner.cpp b/engines/bladerunner/bladerunner.cpp
index 75fc74cc94..1a7f9273d5 100644
--- a/engines/bladerunner/bladerunner.cpp
+++ b/engines/bladerunner/bladerunner.cpp
@@ -216,6 +216,7 @@ BladeRunnerEngine::BladeRunnerEngine(OSystem *syst, const ADGameDescription *des
 	_crimesDatabase          = nullptr;
 	_scene                   = nullptr;
 	_aiScripts               = nullptr;
+	_shapes                  = nullptr;
 	for (int i = 0; i != kActorCount; ++i) {
 		_actors[i]           = nullptr;
 	}




More information about the Scummvm-git-logs mailing list