aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sfx
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2009-03-09 19:44:10 +0000
committerWillem Jan Palenstijn2009-03-09 19:44:10 +0000
commitd2514d20b97c43402835574ef9b5d2258ac3c4a7 (patch)
treee1a21d7007222f3b40c2444343848ec20a895aed /engines/sci/sfx
parentf52557549542d9a3b36c73ca28c02608432ebf5f (diff)
downloadscummvm-rg350-d2514d20b97c43402835574ef9b5d2258ac3c4a7.tar.gz
scummvm-rg350-d2514d20b97c43402835574ef9b5d2258ac3c4a7.tar.bz2
scummvm-rg350-d2514d20b97c43402835574ef9b5d2258ac3c4a7.zip
Reset child iterators on deletion.
This fixes an illegal access in ~TeeSongIterator. svn-id: r39272
Diffstat (limited to 'engines/sci/sfx')
-rw-r--r--engines/sci/sfx/iterator.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/sci/sfx/iterator.cpp b/engines/sci/sfx/iterator.cpp
index fe52d736f8..735d9b0625 100644
--- a/engines/sci/sfx/iterator.cpp
+++ b/engines/sci/sfx/iterator.cpp
@@ -1575,11 +1575,13 @@ SongIterator *TeeSongIterator::handleMessage(SongIteratorMessage msg) {
return NULL;
} else if (!(_status & TEE_LEFT_ACTIVE)) {
delete _children[TEE_LEFT].it;
+ _children[TEE_LEFT].it = 0;
old_it = _children[TEE_RIGHT].it;
delete this;
return old_it;
} else if (!(_status & TEE_RIGHT_ACTIVE)) {
delete _children[TEE_RIGHT].it;
+ _children[TEE_RIGHT].it = 0;
old_it = _children[TEE_LEFT].it;
delete this;
return old_it;