diff options
author | Juan Linietsky <juan@godotengine.org> | 2020-02-12 14:24:06 -0300 |
---|---|---|
committer | Juan Linietsky <juan@godotengine.org> | 2020-02-12 14:24:54 -0300 |
commit | cf8c679a23b21d6c6f29cba6a54eaa2eed88bf92 (patch) | |
tree | 52aca947b395362b2addec4843915b15947c32ca /modules/visual_script | |
parent | 4aa31a2851e3dd5b67193194f899850239b2669d (diff) |
ObjectID converted to a structure, fixes many bugs where used incorrectly as 32 bits.
Diffstat (limited to 'modules/visual_script')
-rw-r--r-- | modules/visual_script/visual_script.cpp | 8 | ||||
-rw-r--r-- | modules/visual_script/visual_script_property_selector.cpp | 6 |
2 files changed, 4 insertions, 10 deletions
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp index be7443adfa..e712190344 100644 --- a/modules/visual_script/visual_script.cpp +++ b/modules/visual_script/visual_script.cpp @@ -2414,8 +2414,8 @@ Variant VisualScriptFunctionState::_signal_callback(const Variant **p_args, int #ifdef DEBUG_ENABLED - ERR_FAIL_COND_V_MSG(instance_id && !ObjectDB::get_instance(instance_id), Variant(), "Resumed after yield, but class instance is gone."); - ERR_FAIL_COND_V_MSG(script_id && !ObjectDB::get_instance(script_id), Variant(), "Resumed after yield, but script is gone."); + ERR_FAIL_COND_V_MSG(instance_id.is_valid() && !ObjectDB::get_instance(instance_id), Variant(), "Resumed after yield, but class instance is gone."); + ERR_FAIL_COND_V_MSG(script_id.is_valid() && !ObjectDB::get_instance(script_id), Variant(), "Resumed after yield, but script is gone."); #endif @@ -2476,8 +2476,8 @@ Variant VisualScriptFunctionState::resume(Array p_args) { ERR_FAIL_COND_V(function == StringName(), Variant()); #ifdef DEBUG_ENABLED - ERR_FAIL_COND_V_MSG(instance_id && !ObjectDB::get_instance(instance_id), Variant(), "Resumed after yield, but class instance is gone."); - ERR_FAIL_COND_V_MSG(script_id && !ObjectDB::get_instance(script_id), Variant(), "Resumed after yield, but script is gone."); + ERR_FAIL_COND_V_MSG(instance_id.is_valid() && !ObjectDB::get_instance(instance_id), Variant(), "Resumed after yield, but class instance is gone."); + ERR_FAIL_COND_V_MSG(script_id.is_valid() && !ObjectDB::get_instance(script_id), Variant(), "Resumed after yield, but script is gone."); #endif diff --git a/modules/visual_script/visual_script_property_selector.cpp b/modules/visual_script/visual_script_property_selector.cpp index e629175094..e8c02a41c4 100644 --- a/modules/visual_script/visual_script_property_selector.cpp +++ b/modules/visual_script/visual_script_property_selector.cpp @@ -529,7 +529,6 @@ void VisualScriptPropertySelector::select_method_from_base_type(const String &p_ base_type = p_base; selected = p_current; type = Variant::NIL; - script = 0; properties = false; instance = NULL; virtuals_only = p_virtuals_only; @@ -554,7 +553,6 @@ void VisualScriptPropertySelector::select_from_base_type(const String &p_base, c base_type = p_base; selected = p_current; type = Variant::NIL; - script = 0; properties = true; visual_script_generic = false; instance = NULL; @@ -601,7 +599,6 @@ void VisualScriptPropertySelector::select_from_basic_type(Variant::Type p_type, base_type = ""; selected = p_current; type = p_type; - script = 0; properties = true; visual_script_generic = false; instance = NULL; @@ -623,7 +620,6 @@ void VisualScriptPropertySelector::select_from_action(const String &p_type, cons base_type = p_type; selected = p_current; type = Variant::NIL; - script = 0; properties = false; visual_script_generic = false; instance = NULL; @@ -645,7 +641,6 @@ void VisualScriptPropertySelector::select_from_instance(Object *p_instance, cons base_type = p_basetype; selected = p_current; type = Variant::NIL; - script = 0; properties = true; visual_script_generic = false; instance = p_instance; @@ -667,7 +662,6 @@ void VisualScriptPropertySelector::select_from_visual_script(const String &p_bas base_type = p_base; selected = ""; type = Variant::NIL; - script = 0; properties = true; visual_script_generic = true; instance = NULL; |