r23748 by jghali - Fix coverity 1438488: Explicit null dereferenced

scribus-commit scribus-commit at lists.scribus.net
Sun May 10 18:11:16 UTC 2020


Author: jghali
Date: Sun May 10 18:11:16 2020
New Revision: 23748

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23748
Log:
Fix coverity 1438488: Explicit null dereferenced

Modified:
    trunk/Scribus/scribus/pageitem_noteframe.cpp

Modified: trunk/Scribus/scribus/pageitem_noteframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23748&path=/trunk/Scribus/scribus/pageitem_noteframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_noteframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_noteframe.cpp	Sun May 10 18:11:16 2020
@@ -27,16 +27,7 @@
 	//set default style for note frame
 	ParagraphStyle newStyle;
 	if (nStyle->notesParStyle().isEmpty() || (nStyle->notesParStyle() == tr("No Style")))
-	{
-		if (nStyle->isEndNotes())
-			//set default doc style
-			newStyle.setParent(m_Doc->paragraphStyles()[0].name());
-		else
-		{
-			newStyle.setParent(m_masterFrame->itemText.defaultStyle().parent());
-			newStyle.applyStyle(m_masterFrame->currentStyle());
-		}
-	}
+		newStyle.setParent(m_Doc->paragraphStyles()[0].name()); // set default doc style
 	else
 		newStyle.setParent(nStyle->notesParStyle());
 	itemText.blockSignals(true);




More information about the scribus-commit mailing list