From 82f06542a507a990b168fe6c7f9ba605ab414d56 Mon Sep 17 00:00:00 2001 From: kobewi Date: Sun, 22 Jan 2023 15:54:42 +0100 Subject: Fix potential crash in EditorPlugin.edit() --- editor/editor_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'editor') 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(p_object)) { GDVIRTUAL_CALL(_edit, Ref(Object::cast_to(p_object))); } else { GDVIRTUAL_CALL(_edit, p_object); -- cgit v1.2.3