aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/saga/actor.cpp4
-rw-r--r--engines/saga/script.cpp4
2 files changed, 7 insertions, 1 deletions
diff --git a/engines/saga/actor.cpp b/engines/saga/actor.cpp
index 5cb91b8663..c2ecff4a1a 100644
--- a/engines/saga/actor.cpp
+++ b/engines/saga/actor.cpp
@@ -897,7 +897,9 @@ void Actor::updateActorsScene(int actorsEntrance) {
}
}
- assert(_protagonist);
+ // _protagonist can be null while loading a game from the command line
+ if (_protagonist == NULL)
+ return;
if ((actorsEntrance >= 0) && (_vm->_scene->_entryList.entryListCount > 0)) {
if (_vm->_scene->_entryList.entryListCount <= actorsEntrance) {
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);