Remove redundant check for AppExit events in ScheduleRunnerPlugin (#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`.
This commit is contained in:
Pixelstorm 2023-08-28 18:13:02 +01:00 committed by GitHub
parent 25e5239d2e
commit 36f29a933f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) =