diff --git a/src/frontends/qt/GuiApplication.cpp b/src/frontends/qt/GuiApplication.cpp index 019088ea71..3a835e9024 100644 --- a/src/frontends/qt/GuiApplication.cpp +++ b/src/frontends/qt/GuiApplication.cpp @@ -1257,6 +1257,8 @@ docstring Application::mathIcon(docstring const & c) void Application::applyPrefs() { + if (!guiApp) + return; if (lyxrc.ui_style != "default") lyx::frontend::GuiApplication::setStyle(toqstr(lyxrc.ui_style)); #if (defined(Q_OS_WIN) || defined(Q_CYGWIN_WIN) || defined(Q_OS_MAC)) && QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)