[Scummvm-git-logs] scummvm master -> 502280f26d0a6d49fd49bf45f90635d7194cd755

athrxx athrxx at scummvm.org
Thu Nov 8 16:58:46 CET 2018


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
502280f26d KYRA: (EOB) - fix possible null pointer deref


Commit: 502280f26d0a6d49fd49bf45f90635d7194cd755
    https://github.com/scummvm/scummvm/commit/502280f26d0a6d49fd49bf45f90635d7194cd755
Author: athrxx (athrxx at scummvm.org)
Date: 2018-11-08T16:50:31+01:00

Commit Message:
KYRA: (EOB) - fix possible null pointer deref

Changed paths:
    engines/kyra/items_eob.cpp


diff --git a/engines/kyra/items_eob.cpp b/engines/kyra/items_eob.cpp
index c9c632f..e2d4b1b 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;
 	}





More information about the Scummvm-git-logs mailing list