aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic
diff options
context:
space:
mode:
authorPaul Gilbert2017-08-28 21:45:07 -0400
committerPaul Gilbert2017-08-28 21:45:07 -0400
commitd7ca6c3bc1a8cd053bada1d697371382deb0d687 (patch)
tree84c9c38da602c2d14822c116c96e8cb79cab0d48 /engines/titanic
parent4a1a7f965f0b8fa62de6a0e9778e9b9afe4db4f0 (diff)
downloadscummvm-rg350-d7ca6c3bc1a8cd053bada1d697371382deb0d687.tar.gz
scummvm-rg350-d7ca6c3bc1a8cd053bada1d697371382deb0d687.tar.bz2
scummvm-rg350-d7ca6c3bc1a8cd053bada1d697371382deb0d687.zip
TITANIC: Fix crash opening GMM during startup & Continue dialog
Diffstat (limited to 'engines/titanic')
-rw-r--r--engines/titanic/titanic.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/titanic/titanic.cpp b/engines/titanic/titanic.cpp
index de28e073a9..67bdf82fa0 100644
--- a/engines/titanic/titanic.cpp
+++ b/engines/titanic/titanic.cpp
@@ -191,7 +191,7 @@ bool TitanicEngine::canLoadGameStateCurrently() {
return false;
if (screenMan && screenMan->_inputHandler->isLocked())
return false;
- if (!gameManager->isntTransitioning())
+ if (!gameManager || !gameManager->isntTransitioning())
return false;
CProjectItem *project = gameManager->_project;
@@ -210,6 +210,8 @@ bool TitanicEngine::canLoadGameStateCurrently() {
bool TitanicEngine::canSaveGameStateCurrently() {
CGameManager *gameManager = _window->_gameManager;
+ if (!gameManager)
+ return false;
return gameManager->_gameState._petActive &&
canLoadGameStateCurrently();