[Scummvm-cvs-logs] scummvm master -> f279cc0e514f0b521a43604be66de945f060c528

wjp wjp at usecode.org
Sat Apr 20 23:55:10 CEST 2013


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:
f279cc0e51 SCI: Add extra sanity check


Commit: f279cc0e514f0b521a43604be66de945f060c528
    https://github.com/scummvm/scummvm/commit/f279cc0e514f0b521a43604be66de945f060c528
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2013-04-20T14:53:06-07:00

Commit Message:
SCI: Add extra sanity check

Changed paths:
    engines/sci/engine/klists.cpp



diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp
index 342fa95..7e6c112 100644
--- a/engines/sci/engine/klists.cpp
+++ b/engines/sci/engine/klists.cpp
@@ -801,7 +801,8 @@ reg_t kArray(EngineState *s, int argc, reg_t *argv) {
 #endif
 			return NULL_REG;
 		}
-		if (s->_segMan->getSegmentObj(argv[1].getSegment())->getType() != SEG_TYPE_ARRAY)
+		SegmentObj *sobj = s->_segMan->getSegmentObj(argv[1].getSegment());
+		if (!sobj || sobj->getType() != SEG_TYPE_ARRAY)
 			error("kArray(Dup): Request to duplicate a segment which isn't an array");
 
 		reg_t arrayHandle;






More information about the Scummvm-git-logs mailing list