You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #44604 from lyuma/gdscript_dictionary_crash
GDScript: Fix crash when iterating through empty dictionary.
This commit is contained in:
@@ -2306,10 +2306,10 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
|
||||
|
||||
Dictionary *dict = VariantInternal::get_dictionary(container);
|
||||
const Variant *next = dict->next(nullptr);
|
||||
*counter = *next;
|
||||
|
||||
if (!dict->is_empty()) {
|
||||
GET_INSTRUCTION_ARG(iterator, 2);
|
||||
*counter = *next;
|
||||
*iterator = *next;
|
||||
|
||||
// Skip regular iterate.
|
||||
|
||||
Reference in New Issue
Block a user