From 206af9da32c54bc5b9ef6a399a47a876ff70a205 Mon Sep 17 00:00:00 2001 From: Observer KRypt0n_ Date: Sat, 28 Jan 2023 19:20:54 +0200 Subject: [PATCH] 1.2.5 hotfix - fixed #28 's bug with app's crash on the first run --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 0dbf7e5..6d19d2f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -67,8 +67,6 @@ fn main() { // Init app window and show it application.connect_activate(move |app| { - let config = lib::config::get().expect("Failed to load config"); - // Apply CSS styles to the application let provider = CssProvider::new(); @@ -93,6 +91,8 @@ fn main() { } else { + let config = lib::config::get().expect("Failed to load config"); + // Create wine builds folder if !Path::new(&config.game.wine.builds).exists() { fs::create_dir_all(config.game.wine.builds)