Browse Source

Merge pull request #99148 from TopherBriggs/keyframe_crash_fix

Fix crash when inserting keyframes with empty properties array
Thaddeus Crews 11 months ago
parent
commit
a52e28436e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      editor/editor_inspector.cpp

+ 1 - 1
editor/editor_inspector.cpp

@@ -2724,7 +2724,7 @@ void EditorInspector::_parse_added_editors(VBoxContainer *current_vbox, EditorIn
 	for (const EditorInspectorPlugin::AddedEditor &F : ped->added_editors) {
 	for (const EditorInspectorPlugin::AddedEditor &F : ped->added_editors) {
 		EditorProperty *ep = Object::cast_to<EditorProperty>(F.property_editor);
 		EditorProperty *ep = Object::cast_to<EditorProperty>(F.property_editor);
 
 
-		if (ep && current_favorites.has(F.properties[0])) {
+		if (ep && !F.properties.is_empty() && current_favorites.has(F.properties[0])) {
 			ep->favorited = true;
 			ep->favorited = true;
 			favorites_vbox->add_child(F.property_editor);
 			favorites_vbox->add_child(F.property_editor);
 		} else {
 		} else {