aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/pink/objects/sequences/sequence.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/engines/pink/objects/sequences/sequence.cpp b/engines/pink/objects/sequences/sequence.cpp
index b95605758c..577b310007 100644
--- a/engines/pink/objects/sequences/sequence.cpp
+++ b/engines/pink/objects/sequences/sequence.cpp
@@ -71,16 +71,12 @@ void Sequence::init(int unk) {
}
void Sequence::start(int unk) {
- if (_context->_nextItemIndex >= _items.size()){
+ if (_context->_nextItemIndex >= _items.size() || !_items[_context->_nextItemIndex]->execute(_context->_index, this, unk)){
debug("Sequence %s ended", _name.c_str());
end();
return;
}
- if (!_items[_context->_nextItemIndex]->execute(_context->_index, this, unk)){
- assert(0);
- }
-
uint i;
for (i = _context->_nextItemIndex + 1; i <_items.size(); ++i){
if (_items[i]->isLeader())