Skip to content

LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust

fix(macos): prevent SIGILL crash on exit by replacing viewport close with clean process exit

onemannoplan5c1dcd4f970d
diff --git a/apps/lightcraft/src/native_menu.rs b/apps/lightcraft/src/native_menu.rs
index 647f7e27b..6c6d2f2b6 100644
--- a/apps/lightcraft/src/native_menu.rs
+++ b/apps/lightcraft/src/native_menu.rs
@@ -360,8 +360,7 @@ impl NativeMenu {
lightcraft_ui_egui::i18n::set_language(app.ui.language);
while let Ok(key) = self.rx.try_recv() {
if key == QUIT {
- ctx.send_viewport_cmd(egui::ViewportCommand::Close);
- continue;
+ std::process::exit(0);
}
if key == "app.about" || key == SETTINGS {
let _ = app.run(&key, serde_json::json!({}));