aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2014-03-02 20:02:26 +0100
committerStrangerke2014-03-02 20:44:21 +0100
commit3c41d9b9cb481bd0cdf0a9847f3ed5e8b50c6320 (patch)
treeeae0b67a4f71de39c2cffc61c701e312aac4f2c9 /engines
parenta1d9281fb4002b298a4c8f34186a71d1a98b83e5 (diff)
downloadscummvm-rg350-3c41d9b9cb481bd0cdf0a9847f3ed5e8b50c6320.tar.gz
scummvm-rg350-3c41d9b9cb481bd0cdf0a9847f3ed5e8b50c6320.tar.bz2
scummvm-rg350-3c41d9b9cb481bd0cdf0a9847f3ed5e8b50c6320.zip
CGE: Add a safeguard in pocFul
Diffstat (limited to 'engines')
-rw-r--r--engines/cge/snail.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/cge/snail.cpp b/engines/cge/snail.cpp
index 942a9c414a..1a6ca0789e 100644
--- a/engines/cge/snail.cpp
+++ b/engines/cge/snail.cpp
@@ -658,6 +658,9 @@ void CGEEngine::selectPocket(int n) {
void CGEEngine::pocFul() {
debugC(1, kCGEDebugEngine, "CGEEngine::pocFul()");
+ if (!_hero)
+ error("pocFul - Unexpected null _hero");
+
_hero->park();
_commandHandler->addCommand(kCmdWait, -1, -1, _hero);
_commandHandler->addCommand(kCmdSeq, -1, kSeqPocketFull, _hero);