diff options
author | Filippos Karapetis | 2010-06-30 07:28:30 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-06-30 07:28:30 +0000 |
commit | 7c5b31eb6d6e53a91efb9e0575f07055ea626ed0 (patch) | |
tree | 6e7fcfcf04765ccd56c002368a4e147bcb105340 /engines | |
parent | 9f1413b338da98139efb68434f7f875e2abbd745 (diff) | |
download | scummvm-rg350-7c5b31eb6d6e53a91efb9e0575f07055ea626ed0.tar.gz scummvm-rg350-7c5b31eb6d6e53a91efb9e0575f07055ea626ed0.tar.bz2 scummvm-rg350-7c5b31eb6d6e53a91efb9e0575f07055ea626ed0.zip |
Also erase the value of the list node itself when deleting it inside kDeleteKey, as it might be referenced again before the GC is invoked
svn-id: r50516
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/klists.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp index ef2f40e235..6e01768958 100644 --- a/engines/sci/engine/klists.cpp +++ b/engines/sci/engine/klists.cpp @@ -346,9 +346,11 @@ reg_t kDeleteKey(EngineState *s, int argc, reg_t *argv) { if (!n->succ.isNull()) s->_segMan->lookupNode(n->succ)->pred = n->pred; - // Erase references to the predecessor and successor nodes + // Erase the node itself, as the game might reference it + // again before the GC is invoked n->pred = NULL_REG; n->succ = NULL_REG; + n->value = NULL_REG; return make_reg(0, 1); // Signal success } |