diff options
author | kobewi <kobewi4e@gmail.com> | 2023-01-22 15:54:42 +0100 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2023-01-22 15:54:42 +0100 |
commit | 82f06542a507a990b168fe6c7f9ba605ab414d56 (patch) | |
tree | 91a13ab6456e80b8ed826f5503eadd68509987bf | |
parent | cd031fd31a8fdcdae1e93d1b20caf93230f0ac59 (diff) |
Fix potential crash in EditorPlugin.edit()
-rw-r--r-- | editor/editor_plugin.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index 7f02148dfc..14cdbc364e 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -662,7 +662,7 @@ void EditorPlugin::make_visible(bool p_visible) { } void EditorPlugin::edit(Object *p_object) { - if (p_object->is_class("Resource")) { + if (Object::cast_to<Resource>(p_object)) { GDVIRTUAL_CALL(_edit, Ref<Resource>(Object::cast_to<Resource>(p_object))); } else { GDVIRTUAL_CALL(_edit, p_object); |