mirror of
https://github.com/godotengine/godot.git
synced 2025-02-16 15:50:45 +00:00
Fix potential crash in EditorPlugin.edit()
This commit is contained in:
parent
cd031fd31a
commit
82f06542a5
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user