mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-16 19:21:12 +00:00
Fix regression introduced in ed0f4c3023d8a8b78d04b00177e25a9f5840077d
This commit is contained in:
parent
855c7d8ee3
commit
f3bb1ecdf1
@ -105,9 +105,6 @@ class App::CoreModules {
|
||||
public:
|
||||
ConfigModule m_configModule;
|
||||
Preferences m_preferences;
|
||||
CoreModules() {
|
||||
initialize_color_spaces();
|
||||
}
|
||||
};
|
||||
|
||||
class App::LoadLanguage {
|
||||
@ -231,6 +228,8 @@ void App::initialize(const AppOptions& options)
|
||||
break;
|
||||
}
|
||||
|
||||
initialize_color_spaces();
|
||||
|
||||
// Load modules
|
||||
m_modules = new Modules(createLogInDesktop, preferences());
|
||||
m_legacy = new LegacyModules(isGui() ? REQUIRE_INTERFACE: 0);
|
||||
|
@ -26,9 +26,12 @@ static Preferences* singleton = nullptr;
|
||||
// static
|
||||
Preferences& Preferences::instance()
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
// Preferences can be used only from the main UI thread. In other
|
||||
// case access to std::map<> could crash the program.
|
||||
ui::assert_ui_thread();
|
||||
if (ui::UISystem::instance())
|
||||
ui::assert_ui_thread();
|
||||
#endif
|
||||
|
||||
ASSERT(singleton);
|
||||
return *singleton;
|
||||
|
@ -362,8 +362,7 @@ void execute_from_ui_thread(std::function<void()>&& f)
|
||||
|
||||
bool is_ui_thread()
|
||||
{
|
||||
return (!main_gui_thread ||
|
||||
main_gui_thread == base::this_thread::native_handle());
|
||||
return (main_gui_thread == base::this_thread::native_handle());
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
Loading…
x
Reference in New Issue
Block a user