aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/lift.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2014-02-01 20:21:07 +0200
committerEugene Sandulenko2014-02-01 22:25:53 +0200
commite4e699beb25a69d41878d884f763608636d4ba7d (patch)
treec4bf086e8d8055645b37df1776520ab0dd3e1ac1 /engines/fullpipe/lift.cpp
parent1879151c227ecb9074117d2bd562db45ee7af507 (diff)
downloadscummvm-rg350-e4e699beb25a69d41878d884f763608636d4ba7d.tar.gz
scummvm-rg350-e4e699beb25a69d41878d884f763608636d4ba7d.tar.bz2
scummvm-rg350-e4e699beb25a69d41878d884f763608636d4ba7d.zip
FULLPIPE: Check for potential null dereference. Matches original
Diffstat (limited to 'engines/fullpipe/lift.cpp')
-rw-r--r--engines/fullpipe/lift.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/fullpipe/lift.cpp b/engines/fullpipe/lift.cpp
index 8acea6a59d..13e2af31ee 100644
--- a/engines/fullpipe/lift.cpp
+++ b/engines/fullpipe/lift.cpp
@@ -220,8 +220,12 @@ void FullpipeEngine::lift_init(Scene *sc, int enterSeq, int exitSeq) {
}
void FullpipeEngine::lift_exitSeq(ExCommand *cmd) {
- if (cmd)
- _globalMessageQueueList->getMessageQueueById(cmd->_parId)->activateExCommandsByKind(34);
+ if (cmd) {
+ MessageQueue *mq = _globalMessageQueueList->getMessageQueueById(cmd->_parId);
+
+ if (mq)
+ mq->activateExCommandsByKind(34);
+ }
_lift->changeStatics2(ST_LFT_CLOSED);