1.2.5 hotfix

- fixed #28 's bug with app's crash on the first run
This commit is contained in:
Observer KRypt0n_ 2023-01-28 19:20:54 +02:00
parent cb701aaf3f
commit 206af9da32
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2

View file

@ -67,8 +67,6 @@ fn main() {
// Init app window and show it // Init app window and show it
application.connect_activate(move |app| { application.connect_activate(move |app| {
let config = lib::config::get().expect("Failed to load config");
// Apply CSS styles to the application // Apply CSS styles to the application
let provider = CssProvider::new(); let provider = CssProvider::new();
@ -93,6 +91,8 @@ fn main() {
} }
else { else {
let config = lib::config::get().expect("Failed to load config");
// Create wine builds folder // Create wine builds folder
if !Path::new(&config.game.wine.builds).exists() { if !Path::new(&config.game.wine.builds).exists() {
fs::create_dir_all(config.game.wine.builds) fs::create_dir_all(config.game.wine.builds)