r23721 by jghali - [Fix coverity 1463113: Uninitialized pointer field

scribus-commit scribus-commit at lists.scribus.net
Sun May 10 11:30:03 UTC 2020


Author: jghali
Date: Sun May 10 11:30:03 2020
New Revision: 23721

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23721
Log:
[Fix coverity 1463113: Uninitialized pointer field

Modified:
    trunk/Scribus/scribus/ui/contentpalette_page.cpp
    trunk/Scribus/scribus/ui/contentpalette_page.h

Modified: trunk/Scribus/scribus/ui/contentpalette_page.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23721&path=/trunk/Scribus/scribus/ui/contentpalette_page.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/contentpalette_page.cpp	(original)
+++ trunk/Scribus/scribus/ui/contentpalette_page.cpp	Sun May 10 11:30:03 2020
@@ -18,11 +18,7 @@
 
 ContentPalette_Page::ContentPalette_Page( QWidget* parent)
 	: QWidget(parent),
-	  m_haveDoc(false),
-	  m_haveItem(false),
-	  m_unitRatio(1.0),
-	  m_unitIndex(SC_PT),
-	  m_doc(nullptr)
+	  m_unitIndex(SC_PT)
 {
 	setupUi(this);
 	setSizePolicy( QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum));

Modified: trunk/Scribus/scribus/ui/contentpalette_page.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23721&path=/trunk/Scribus/scribus/ui/contentpalette_page.h
==============================================================================
--- trunk/Scribus/scribus/ui/contentpalette_page.h	(original)
+++ trunk/Scribus/scribus/ui/contentpalette_page.h	Sun May 10 11:30:03 2020
@@ -34,16 +34,14 @@
 	// void updateColorSpecialGradient();
 
 protected:
-
-	bool      m_haveDoc;
-	bool      m_haveItem;
-	double    m_unitRatio;
-	int       m_unitIndex;
+	bool      m_haveDoc = false;
+	bool      m_haveItem = false;
+	double    m_unitRatio = 1.0;
+	int       m_unitIndex = 0;
 
 	// PageItem *m_item;
-	ScribusMainWindow*       m_ScMW;
+	ScribusMainWindow*       m_ScMW = nullptr;
 	ScGuardedPtr<ScribusDoc> m_doc;
-	// Selection*               m_tmpSelection;
 
 public slots:
 	void setMainWindow(ScribusMainWindow *mw);




More information about the scribus-commit mailing list