mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user