summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-07-29 21:38:37 +0200
committerGitHub <noreply@github.com>2019-07-29 21:38:37 +0200
commitadffd9aaef124ae42b97c0c97cfe3c47bf813344 (patch)
tree7fd8a04dc237e90d1cb593f9ac55d0573a8856b3
parentbaa1d0c3d0d4001b4d4696772461fc714e68f58e (diff)
parent147990cb6dcd6659e1ffd3dd5aa89603ec4806c9 (diff)
Merge pull request #30935 from YeldhamDev/gdnative_plugin_fix
Fix 'GDNativeLibrary' editor being incorrectly opened
-rw-r--r--modules/gdnative/gdnative_library_editor_plugin.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/gdnative/gdnative_library_editor_plugin.cpp b/modules/gdnative/gdnative_library_editor_plugin.cpp
index 46547feff8..5d272a6cdc 100644
--- a/modules/gdnative/gdnative_library_editor_plugin.cpp
+++ b/modules/gdnative/gdnative_library_editor_plugin.cpp
@@ -396,11 +396,9 @@ GDNativeLibraryEditor::GDNativeLibraryEditor() {
void GDNativeLibraryEditorPlugin::edit(Object *p_node) {
- if (Object::cast_to<GDNativeLibrary>(p_node)) {
- library_editor->edit(Object::cast_to<GDNativeLibrary>(p_node));
- library_editor->show();
- } else
- library_editor->hide();
+ Ref<GDNativeLibrary> new_library = Object::cast_to<GDNativeLibrary>(p_node);
+ if (new_library.is_valid())
+ library_editor->edit(new_library);
}
bool GDNativeLibraryEditorPlugin::handles(Object *p_node) const {