aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2007-02-17 03:41:41 +0000
committerPaul Gilbert2007-02-17 03:41:41 +0000
commitc4cbf9dc92cf16ec84cb15bce4912b6165632680 (patch)
tree58fe4a853195f8792884333898bc00eea3e301ca
parentf1f88c43c022912eb1f1ceee4d7a2d0630e08d5d (diff)
downloadscummvm-rg350-c4cbf9dc92cf16ec84cb15bce4912b6165632680.tar.gz
scummvm-rg350-c4cbf9dc92cf16ec84cb15bce4912b6165632680.tar.bz2
scummvm-rg350-c4cbf9dc92cf16ec84cb15bce4912b6165632680.zip
Added some asserts to setSupportData method to ensure the passed variables are valid
svn-id: r25647
-rw-r--r--engines/lure/scripts.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/lure/scripts.cpp b/engines/lure/scripts.cpp
index 4ffdd56b70..47e2291890 100644
--- a/engines/lure/scripts.cpp
+++ b/engines/lure/scripts.cpp
@@ -407,7 +407,10 @@ void Script::setSupportData(uint16 hotspotId, uint16 index, uint16 v3) {
uint16 dataId = res.getCharOffset(index);
CharacterScheduleEntry *entry = res.charSchedules().getEntry(dataId);
+ assert(entry != NULL);
Hotspot *h = res.getActiveHotspot(hotspotId);
+ assert(h != NULL);
+ assert(!h->currentActions().isEmpty());
h->currentActions().pop();
h->currentActions().addFront(DISPATCH_ACTION, entry, h->roomNumber());