r23730 by jghali - Fix coverity 1463095: Uninitialized pointer field

scribus-commit scribus-commit at lists.scribus.net
Sun May 10 12:53:51 UTC 2020


Author: jghali
Date: Sun May 10 12:53:51 2020
New Revision: 23730

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

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

Modified: trunk/Scribus/scribus/ui/contentpalette_default.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23730&path=/trunk/Scribus/scribus/ui/contentpalette_default.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/contentpalette_default.cpp	(original)
+++ trunk/Scribus/scribus/ui/contentpalette_default.cpp	Sun May 10 12:53:51 2020
@@ -17,12 +17,7 @@
 #include "selection.h"
 
 ContentPalette_Default::ContentPalette_Default( QWidget* parent)
-	: QWidget(parent),
-	  m_haveDoc(false),
-	  m_haveItem(false),
-	  m_unitRatio(1.0),
-	  m_unitIndex(SC_PT),
-	  m_doc(nullptr)
+	: QWidget(parent)
 {
 	setupUi(this);
 	setSizePolicy( QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum));

Modified: trunk/Scribus/scribus/ui/contentpalette_default.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23730&path=/trunk/Scribus/scribus/ui/contentpalette_default.h
==============================================================================
--- trunk/Scribus/scribus/ui/contentpalette_default.h	(original)
+++ trunk/Scribus/scribus/ui/contentpalette_default.h	Sun May 10 12:53:51 2020
@@ -35,12 +35,12 @@
 
 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;
 
-	ScribusMainWindow*       m_ScMW;
+	ScribusMainWindow*       m_ScMW = nullptr;
 	ScGuardedPtr<ScribusDoc> m_doc;
 
 	void setLabelText();




More information about the scribus-commit mailing list