Fix crash in batch LyX when ui_style is set (#13141)

This was due to guiApp not existing in batch mode
This commit is contained in:
Juergen Spitzmueller 2025-01-14 11:49:55 +01:00
parent 2d59031c3e
commit 68fa1a07e3

View File

@ -1257,6 +1257,8 @@ docstring Application::mathIcon(docstring const & c)
void Application::applyPrefs() void Application::applyPrefs()
{ {
if (!guiApp)
return;
if (lyxrc.ui_style != "default") if (lyxrc.ui_style != "default")
lyx::frontend::GuiApplication::setStyle(toqstr(lyxrc.ui_style)); 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) #if (defined(Q_OS_WIN) || defined(Q_CYGWIN_WIN) || defined(Q_OS_MAC)) && QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)