mirror of
https://github.com/bevyengine/bevy
synced 2024-11-26 06:30:19 +00:00
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:
parent
25e5239d2e
commit
36f29a933f
1 changed files with 0 additions and 9 deletions
|
@ -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) =
|
||||
|
|
Loading…
Reference in a new issue