Skip to content

Commit

Permalink
Fix crash on changing resource type of dictionary new key/value while…
Browse files Browse the repository at this point in the history
… editing the resource
  • Loading branch information
ajreckof committed Feb 28, 2024
1 parent fb10e67 commit e922abd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions editor/editor_resource_picker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<Resource> old_edited_resource = edited_resource;
edited_resource = Ref<Resource>(resp);
emit_signal(SNAME("resource_changed"), edited_resource);
_update_resource();
Expand Down

0 comments on commit e922abd

Please sign in to comment.