From c4cbf9dc92cf16ec84cb15bce4912b6165632680 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 17 Feb 2007 03:41:41 +0000 Subject: Added some asserts to setSupportData method to ensure the passed variables are valid svn-id: r25647 --- engines/lure/scripts.cpp | 3 +++ 1 file changed, 3 insertions(+) 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()); -- cgit v1.2.3