From d7ca6c3bc1a8cd053bada1d697371382deb0d687 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 28 Aug 2017 21:45:07 -0400 Subject: TITANIC: Fix crash opening GMM during startup & Continue dialog --- engines/titanic/titanic.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'engines') 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(); -- cgit v1.2.3