Skip to content

Commit

Permalink
Merge pull request #48347 from Blackiris/fix-temporary-key-not-released
Browse files Browse the repository at this point in the history
GDScript: Fix temporary value not released when used as a dictionary key
  • Loading branch information
vnen authored May 17, 2021
2 parents 92c04fa + 8252266 commit cdb3726
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/gdscript/gdscript_compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,9 @@ GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &code
} else {
gen->write_set(prev_base, key, assigned);
}
if (key.mode == GDScriptCodeGenerator::Address::TEMPORARY) {
gen->pop_temporary();
}
if (assigned.mode == GDScriptCodeGenerator::Address::TEMPORARY) {
gen->pop_temporary();
}
Expand Down

0 comments on commit cdb3726

Please sign in to comment.