From 5be46506306d26030ccb47915a3801a00ac6cae4 Mon Sep 17 00:00:00 2001 From: pentarctagon Date: Fri, 21 Jun 2024 10:48:48 -0500 Subject: [PATCH] . --- src/preferences/preferences.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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;