r23213 by jghali - Attempt to fix #15626: crash when changing theme

scribus-commit scribus-commit at lists.scribus.net
Wed Sep 25 11:24:07 UTC 2019


Author: jghali
Date: Wed Sep 25 11:24:07 2019
New Revision: 23213

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23213
Log:
Attempt to fix #15626: crash when changing theme

Modified:
    trunk/Scribus/scribus/scribus.cpp

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23213&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Wed Sep 25 11:24:07 2019
@@ -6665,7 +6665,13 @@
 		if (newUIStyle.isEmpty())
 			ScQApp->setStyle(m_prefsManager.guiSystemStyle());
 		else
-			ScQApp->setStyle(QStyleFactory::create(newUIStyle));
+		{
+			QStyle * newStyle = QStyleFactory::create(newUIStyle);
+			if (newStyle)
+				ScQApp->setStyle(newStyle);
+			else
+				m_prefsManager.appPrefs.uiPrefs.style = oldPrefs.uiPrefs.style;
+		}
 	}
 	int newUIFontSize = m_prefsManager.guiFontSize();
 	if (oldPrefs.uiPrefs.applicationFontSize != newUIFontSize)




More information about the scribus-commit mailing list