From 617a500ef243df46dafbe7e036e3ea220b0feb78 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 1 Aug 2007 21:47:17 +0000 Subject: IHNM and ITE: ScummVM will no longer crash when loading games from the command line svn-id: r28394 --- engines/saga/script.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engines/saga/script.cpp') diff --git a/engines/saga/script.cpp b/engines/saga/script.cpp index 262d63c51f..82fcb352c0 100644 --- a/engines/saga/script.cpp +++ b/engines/saga/script.cpp @@ -750,6 +750,10 @@ void Script::whichObject(const Point& mousePoint) { _leftButtonVerb = _currentVerb; newRightButtonVerb = getVerbType(kVerbNone); + // _protagonist can be null while loading a game from the command line + if (_vm->_actor->_protagonist == NULL) + return; + if (_vm->_actor->_protagonist->_currentAction != kActionWalkDir) { if (_vm->_scene->getHeight() >= mousePoint.y) { newObjectId = _vm->_actor->hitTest(mousePoint, true); -- cgit v1.2.3