mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
correctly setup everything in the default run_once runner (#8740)
# Objective - Fix #8658 - `without_winit` example panics `thread 'Compute Task Pool (2)' panicked at 'called `Option::unwrap()` on a `None` value', crates/bevy_render/src/pipelined_rendering.rs:134:84` ## Solution - In the default runner method `run_once`, correctly finish the initialisation of the plugins. `run_once` can't be called twice so it's ok to do it there
This commit is contained in:
parent
3507b21dce
commit
4e25008dd6
2 changed files with 8 additions and 0 deletions
|
@ -20,6 +20,7 @@ bevy_derive = { path = "../bevy_derive", version = "0.11.0-dev" }
|
|||
bevy_ecs = { path = "../bevy_ecs", version = "0.11.0-dev", default-features = false }
|
||||
bevy_reflect = { path = "../bevy_reflect", version = "0.11.0-dev", optional = true }
|
||||
bevy_utils = { path = "../bevy_utils", version = "0.11.0-dev" }
|
||||
bevy_tasks = { path = "../bevy_tasks", version = "0.11.0-dev" }
|
||||
|
||||
# other
|
||||
serde = { version = "1.0", features = ["derive"], optional = true }
|
||||
|
|
|
@ -956,6 +956,13 @@ impl App {
|
|||
}
|
||||
|
||||
fn run_once(mut app: App) {
|
||||
while !app.ready() {
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
bevy_tasks::tick_global_task_pools_on_main_thread();
|
||||
}
|
||||
app.finish();
|
||||
app.cleanup();
|
||||
|
||||
app.update();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue