diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-10-06 13:38:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-06 13:38:04 +0200 |
commit | 9fc7d89f5e93ff0a400859d57a979c73052fb600 (patch) | |
tree | bf5372260c8954d7a35b07f3d7084077e9bc75a6 | |
parent | dda6d805980cdeebd52d993904df701331de7b3b (diff) | |
parent | 99d9af4fbaeb9b7937f0a4b3f8c48c82207f64a5 (diff) |
Merge pull request #22796 from KoderaSoftwareUnlimited/fix-segfault-mouse-move-related
Reverts warning fix on release builds that caused segfault in release build
-rw-r--r-- | modules/gdscript/gdscript_function.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp index 8088dcf17d..ca81d6d926 100644 --- a/modules/gdscript/gdscript_function.cpp +++ b/modules/gdscript/gdscript_function.cpp @@ -673,7 +673,6 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a OPCODE(OPCODE_SET_MEMBER) { CHECK_SPACE(3); -#ifdef DEBUG_ENABLED int indexname = _code_ptr[ip + 1]; GD_ERR_BREAK(indexname < 0 || indexname >= _global_names_count); const StringName *index = &_global_names_ptr[indexname]; @@ -681,6 +680,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a bool valid; bool ok = ClassDB::set_property(p_instance->owner, *index, *src, &valid); +#ifdef DEBUG_ENABLED if (!ok) { err_text = "Internal error setting property: " + String(*index); OPCODE_BREAK; @@ -696,13 +696,13 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a OPCODE(OPCODE_GET_MEMBER) { CHECK_SPACE(3); -#ifdef DEBUG_ENABLED int indexname = _code_ptr[ip + 1]; GD_ERR_BREAK(indexname < 0 || indexname >= _global_names_count); const StringName *index = &_global_names_ptr[indexname]; GET_VARIANT_PTR(dst, 2); - bool ok = ClassDB::get_property(p_instance->owner, *index, *dst); + +#ifdef DEBUG_ENABLED if (!ok) { err_text = "Internal error getting property: " + String(*index); OPCODE_BREAK; @@ -749,13 +749,13 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a OPCODE(OPCODE_ASSIGN_TYPED_BUILTIN) { CHECK_SPACE(4); + Variant::Type var_type = (Variant::Type)_code_ptr[ip + 1]; GET_VARIANT_PTR(dst, 2); GET_VARIANT_PTR(src, 3); -#ifdef DEBUG_ENABLED - Variant::Type var_type = (Variant::Type)_code_ptr[ip + 1]; GD_ERR_BREAK(var_type < 0 || var_type >= Variant::VARIANT_MAX); +#ifdef DEBUG_ENABLED if (src->get_type() != var_type) { if (Variant::can_convert_strict(src->get_type(), var_type)) { Variant::CallError ce; |