r24939 by jghali - #16743: Crash when clicking on specific text frame in master page

scribus-commit scribus-commit at lists.scribus.net
Sun Feb 13 21:05:02 UTC 2022


Author: jghali
Date: Sun Feb 13 21:05:02 2022
New Revision: 24939

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24939
Log:
#16743: Crash when clicking on specific text frame in master page

Modified:
    branches/Version15x/Scribus/scribus/ui/propertiespalette_text.cpp

Modified: branches/Version15x/Scribus/scribus/ui/propertiespalette_text.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24939&path=/branches/Version15x/Scribus/scribus/ui/propertiespalette_text.cpp
==============================================================================
--- branches/Version15x/Scribus/scribus/ui/propertiespalette_text.cpp	(original)
+++ branches/Version15x/Scribus/scribus/ui/propertiespalette_text.cpp	Sun Feb 13 21:05:02 2022
@@ -553,8 +553,9 @@
 		QString defaultCharStyle;
 		if (!newCurrent.parent().isEmpty())
 		{
-			const ParagraphStyle& paraStyle = m_doc->paragraphStyles().get(newCurrent.parent());
-			defaultCharStyle = paraStyle.charStyle().parent();
+			const ParagraphStyle* paraStyle = m_doc->paragraphStyles().getPointer(newCurrent.parent());
+			if (paraStyle)
+				defaultCharStyle = paraStyle->charStyle().parent();
 			if (defaultCharStyle.isEmpty())
 				defaultCharStyle = CommonStrings::DefaultCharacterStyle;
 		}




More information about the scribus-commit mailing list