Skip to content

Commit

Permalink
Fix panic in bevy_ui layout
Browse files Browse the repository at this point in the history
  • Loading branch information
msvbg committed Apr 1, 2024
1 parent 9790c02 commit 63d8d17
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/bevy_ui/src/layout/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ without UI components as a child of an entity with UI components, results may be
}
}

let taffy_node = self.entity_to_taffy.get(&entity).unwrap();
let Some(taffy_node) = self.entity_to_taffy.get(&entity) else {
warn!("Missing taffy node for entity when calling update_children.");
return;
};
self.taffy
.set_children(*taffy_node, &taffy_children)
.unwrap();
Expand Down

0 comments on commit 63d8d17

Please sign in to comment.