diff options
author | athrxx | 2018-11-08 01:34:46 +0100 |
---|---|---|
committer | athrxx | 2018-11-08 16:50:31 +0100 |
commit | 502280f26d0a6d49fd49bf45f90635d7194cd755 (patch) | |
tree | acb6816d93b3025a07b8a00f6d10bdac426ab583 | |
parent | a37e38830496f4a414bd671428aedbe8831652ff (diff) | |
download | scummvm-rg350-502280f26d0a6d49fd49bf45f90635d7194cd755.tar.gz scummvm-rg350-502280f26d0a6d49fd49bf45f90635d7194cd755.tar.bz2 scummvm-rg350-502280f26d0a6d49fd49bf45f90635d7194cd755.zip |
KYRA: (EOB) - fix possible null pointer deref
-rw-r--r-- | engines/kyra/items_eob.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/kyra/items_eob.cpp b/engines/kyra/items_eob.cpp index c9c632f60b..e2d4b1be56 100644 --- a/engines/kyra/items_eob.cpp +++ b/engines/kyra/items_eob.cpp @@ -643,7 +643,8 @@ void EoBCoreEngine::explodeObject(EoBFlyingObject *fo, int block, Item item) { int b = _expObjectTlMode ? _expObjectTlMode[tl] : 2; - if (b == 0 || (b == 1 && (fo->direction & 1) == (_currentDirection & 1))) { + uint8 fdr = fo ? fo->direction : 0; + if (b == 0 || (b == 1 && (fdr & 1) == (_currentDirection & 1))) { snd_processEnvironmentalSoundEffect(35, _currentBlock); return; } |