From d2514d20b97c43402835574ef9b5d2258ac3c4a7 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Mon, 9 Mar 2009 19:44:10 +0000 Subject: Reset child iterators on deletion. This fixes an illegal access in ~TeeSongIterator. svn-id: r39272 --- engines/sci/sfx/iterator.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/sci/sfx') 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; -- cgit v1.2.3