diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-07-28 09:03:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-28 09:03:01 +0200 |
commit | fb086d44cf197c4e584c7ad0d538d1b8ea071be9 (patch) | |
tree | 524a2aef7721ac47b08a0c11fe640d77e3468685 /modules/gdscript | |
parent | 9e0fad63ca1c2f1c42e1f0b7c7c464b19f462f1c (diff) | |
parent | 13075779328485b5ead6d9c5a317b894f193a9ae (diff) |
Merge pull request #63560 from V-Sekai/named_global_crashfix
Diffstat (limited to 'modules/gdscript')
-rw-r--r-- | modules/gdscript/gdscript_vm.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_vm.cpp b/modules/gdscript/gdscript_vm.cpp index 10365f8481..36ccb3d696 100644 --- a/modules/gdscript/gdscript_vm.cpp +++ b/modules/gdscript/gdscript_vm.cpp @@ -3295,6 +3295,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a int globalname_idx = _code_ptr[ip + 2]; GD_ERR_BREAK(globalname_idx < 0 || globalname_idx >= _global_names_count); const StringName *globalname = &_global_names_ptr[globalname_idx]; + GD_ERR_BREAK(!GDScriptLanguage::get_singleton()->get_named_globals_map().has(*globalname)); GET_INSTRUCTION_ARG(dst, 0); *dst = GDScriptLanguage::get_singleton()->get_named_globals_map()[*globalname]; |