diff options
-rw-r--r-- | editor/property_editor.cpp | 2 | ||||
-rw-r--r-- | modules/gdnative/nativescript/nativescript.cpp | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index 46d52d21d4..87906c5a93 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -665,6 +665,8 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: } else if (hint == PROPERTY_HINT_PROPERTY_OF_INSTANCE) { + MAKE_PROPSELECT + Object *instance = ObjectDB::get_instance(hint_text.to_int64()); if (instance) property_select->select_property_from_instance(instance, v); diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp index f45217d031..cff5d9c9bd 100644 --- a/modules/gdnative/nativescript/nativescript.cpp +++ b/modules/gdnative/nativescript/nativescript.cpp @@ -398,6 +398,11 @@ Variant NativeScript::_new(const Variant **p_args, int p_argcount, Variant::Call owner = memnew(Reference); } + if (!owner) { + r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL; + return Variant(); + } + Reference *r = Object::cast_to<Reference>(owner); if (r) { ref = REF(r); @@ -793,7 +798,7 @@ NativeScriptLanguage *NativeScriptLanguage::singleton; void NativeScriptLanguage::_unload_stuff(bool p_reload) { for (Map<String, Map<StringName, NativeScriptDesc> >::Element *L = library_classes.front(); L; L = L->next()) { - if (p_reload && !library_gdnatives[L->key()]->get_library()->is_reloadable()) { + if (p_reload && library_gdnatives[L->key()].is_valid() && !library_gdnatives[L->key()]->get_library()->is_reloadable()) { continue; } |