Skip to content

Commit

Permalink
Remove redundant check for AppExit events in ScheduleRunnerPlugin (
Browse files Browse the repository at this point in the history
…#9421)

# Objective

Fixes #9420

## Solution

Remove one of the two `AppExit` event checks in the
`ScheduleRunnerPlugin`'s main loop. Specificially, the check that
happens immediately before calling `App.update()`, to be consistent with
the `WinitPlugin`.
  • Loading branch information
BigWingBeat committed Aug 28, 2023
1 parent 25e5239 commit 36f29a9
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions crates/bevy_app/src/schedule_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,6 @@ impl Plugin for ScheduleRunnerPlugin {
-> Result<Option<Duration>, AppExit> {
let start_time = Instant::now();

if let Some(app_exit_events) =
app.world.get_resource_mut::<Events<AppExit>>()
{
if let Some(exit) = app_exit_event_reader.iter(&app_exit_events).last()
{
return Err(exit.clone());
}
}

app.update();

if let Some(app_exit_events) =
Expand Down

0 comments on commit 36f29a9

Please sign in to comment.