commit 68fa1a07e37f5e2cfcf930d66b25d744237b9620
Author: Juergen Spitzmueller <[email protected]>
Date:   Tue Jan 14 11:49:55 2025 +0100

    Fix crash in batch LyX when ui_style is set (#13141)
    
    This was due to guiApp not existing in batch mode
---
 src/frontends/qt/GuiApplication.cpp | 2 ++
 1 file changed, 2 insertions(+)

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)
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to