mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-03 23:52:41 +00:00
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
This commit is contained in:
parent
9f1413b338
commit
7c5b31eb6d
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user