We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0f5d4d commit fb124c3Copy full SHA for fb124c3
crates/bevy_ui/src/stack.rs
@@ -58,11 +58,9 @@ pub fn ui_stack_system(
58
fill_stack_recursively(&mut ui_stack.uinodes, &mut global_context);
59
60
for (i, entity) in ui_stack.uinodes.iter().enumerate() {
61
- update_query
62
- .get_mut(*entity)
63
- .unwrap()
64
- .bypass_change_detection()
65
- .stack_index = i as u32;
+ if let Ok(mut node) = update_query.get_mut(*entity) {
+ node.bypass_change_detection().stack_index = i as u32;
+ }
66
}
67
68
0 commit comments