File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -411,7 +411,9 @@ pub fn ui_layout_system(
411
411
mut absolute_location : Vec2 ,
412
412
) {
413
413
if let Ok ( ( mut node, mut transform) ) = node_transform_query. get_mut ( entity) {
414
- let layout = ui_surface. get_layout ( entity) . unwrap ( ) ;
414
+ let Ok ( layout) = ui_surface. get_layout ( entity) else {
415
+ return ;
416
+ } ;
415
417
let layout_size =
416
418
inverse_target_scale_factor * Vec2 :: new ( layout. size . width , layout. size . height ) ;
417
419
let layout_location =
Original file line number Diff line number Diff line change @@ -155,7 +155,9 @@ fn update_children_target_camera(
155
155
156
156
for & child in children {
157
157
// Skip if the child has already been updated or update is not needed
158
- if updated_entities. contains ( & child) || camera_to_set == node_query. get ( child) . unwrap ( ) {
158
+ if updated_entities. contains ( & child)
159
+ || camera_to_set == node_query. get ( child) . ok ( ) . flatten ( )
160
+ {
159
161
continue ;
160
162
}
161
163
You can’t perform that action at this time.
0 commit comments