Skip to content

Commit 57f92f0

Browse files
Apply suggestions from review
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
1 parent 60e4318 commit 57f92f0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/bevy_ecs/src/event.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,8 @@ pub fn event_update_system<T: Event>(
766766
mut events: ResMut<Events<T>>,
767767
) {
768768
if let Some(mut s) = signal {
769+
// If we haven't got a signal to update the events, but we *could* get such a signal
770+
// return early and update the events later.
769771
if !std::mem::replace(&mut s.0, false) {
770772
return;
771773
}

0 commit comments

Comments
 (0)