diff --git a/src/lib.rs b/src/lib.rs index 37b5448..67c98f3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -377,6 +377,10 @@ impl Wish { pub fn listen(&self) { rstk::mainloop(); } + + pub fn destroy(&self) { + rstk::end_wish(); + } } impl Frontend for Wish { diff --git a/src/main.rs b/src/main.rs index 4951718..5ec8262 100644 --- a/src/main.rs +++ b/src/main.rs @@ -40,6 +40,11 @@ fn main() { process::exit(1); }); + // End the program if check only. + if args.check { + frontend.destroy(); + } + if let Err(e) = run(clafrica_conf, frontend.clone()) { frontend.raise_error("Application error", &e.to_string()); process::exit(1);