diff --git a/src/preferences/preferences.hpp b/src/preferences/preferences.hpp index fa00c8301641f..0893dff51e46d 100644 --- a/src/preferences/preferences.hpp +++ b/src/preferences/preferences.hpp @@ -13,7 +13,7 @@ */ #pragma once - +#include "log.hpp" #include "config.hpp" #include "filesystem.hpp" #include "game_config.hpp" @@ -207,7 +207,8 @@ class prefs // macos - called "unit_tests" // others - called "boost_unit_tests" static bool called_before_init = !(filesystem::base_name(filesystem::get_exe_path()).find("unit_tests") == std::string::npos && !filesystem::is_userdata_initialized()); - assert(called_before_init && filesystem::get_exe_path().c_str()); + PLAIN_LOG << filesystem::base_name(filesystem::get_exe_path()); + assert(called_before_init && "Attempt to use preferences before userdata initialization"); static prefs prefs_manager; return prefs_manager;