eframe native: Make sure we only shut down once
I don't trust winit to actually exit on ControlFlow::Exit Perhaps this will solve https://github.com/emilk/egui/issues/2027
This commit is contained in:
parent
1fe08bf7e4
commit
e0c7533ede
1 changed files with 2 additions and 2 deletions
|
@ -407,7 +407,7 @@ mod glow_integration {
|
|||
}
|
||||
|
||||
fn save_and_destroy(&mut self) {
|
||||
if let Some(running) = &mut self.running {
|
||||
if let Some(mut running) = self.running.take() {
|
||||
running
|
||||
.integration
|
||||
.save(running.app.as_mut(), running.gl_window.window());
|
||||
|
@ -778,7 +778,7 @@ mod wgpu_integration {
|
|||
}
|
||||
|
||||
fn save_and_destroy(&mut self) {
|
||||
if let Some(running) = &mut self.running {
|
||||
if let Some(mut running) = self.running.take() {
|
||||
if let Some(window) = &self.window {
|
||||
running.integration.save(running.app.as_mut(), window);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue