From 96903d5534f53126c231439682c2034a1688004c Mon Sep 17 00:00:00 2001 From: Andrettin <6322423+Andrettin@users.noreply.github.com> Date: Sun, 25 Feb 2024 19:42:59 +0100 Subject: [PATCH] Fixed database loading --- src/stratagus/stratagus.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/stratagus/stratagus.cpp b/src/stratagus/stratagus.cpp index 65355a294..cbd6f84f8 100644 --- a/src/stratagus/stratagus.cpp +++ b/src/stratagus/stratagus.cpp @@ -533,13 +533,13 @@ QCoro::Task stratagusMain(int argc, char **argv) void load_database(const bool initial_definition) { - database::get()->load(initial_definition).then([]() { - //do nothing - }, [](const std::exception &exception) { + try { + QCoro::waitFor(database::get()->load(initial_definition)); + } catch (...) { exception::report(std::current_exception()); log::log_error("Error loading database."); std::terminate(); - }); + } } void load_defines()