diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp index 95436427ad35..fa40af6c8ade 100644 --- a/editor/editor_resource_picker.cpp +++ b/editor/editor_resource_picker.cpp @@ -467,6 +467,8 @@ void EditorResourcePicker::_edit_menu_cbk(int p_which) { EditorNode::get_editor_data().instantiate_object_properties(obj); + // Prevent freeing of the object until the end of the update of the resource (GH-88286). + Ref old_edited_resource = edited_resource; edited_resource = Ref(resp); emit_signal(SNAME("resource_changed"), edited_resource); _update_resource();