|
From: <and...@us...> - 2009-07-07 11:19:11
|
Revision: 10121
http://plplot.svn.sourceforge.net/plplot/?rev=10121&view=rev
Author: andrewross
Date: 2009-07-07 11:19:10 +0000 (Tue, 07 Jul 2009)
Log Message:
-----------
ANR on behalf of Dmitri Gribenko. Remove check for NULL pointer before calling delete in C++ code. C++ standard ensures that delete will carry out this check anyway.
Modified Paths:
--------------
trunk/bindings/qt_gui/plqt.cpp
Modified: trunk/bindings/qt_gui/plqt.cpp
===================================================================
--- trunk/bindings/qt_gui/plqt.cpp 2009-07-06 02:09:13 UTC (rev 10120)
+++ trunk/bindings/qt_gui/plqt.cpp 2009-07-07 11:19:10 UTC (rev 10121)
@@ -381,7 +381,7 @@
QtRasterDevice::~QtRasterDevice()
{
- if(m_painterP!=NULL) delete m_painterP;
+ delete m_painterP;
}
void QtRasterDevice::definePlotName(const char* fileName, const char* format)
@@ -418,7 +418,7 @@
QtSVGDevice::~QtSVGDevice()
{
- if(m_painterP!=NULL) delete m_painterP;
+ delete m_painterP;
}
void QtSVGDevice::definePlotName(const char* fileName)
@@ -471,7 +471,7 @@
QtEPSDevice::~QtEPSDevice()
{
- if(m_painterP!=NULL) delete m_painterP;
+ delete m_painterP;
}
void QtEPSDevice::definePlotName(const char* fileName, int ifeps)
@@ -513,7 +513,7 @@
QtPLWidget::~QtPLWidget()
{
clearBuffer();
- if(m_pixPixmap!=NULL) delete m_pixPixmap;
+ delete m_pixPixmap;
}
void QtPLWidget::clearWidget()
@@ -751,11 +751,8 @@
void QtPLWidget::resizeEvent( QResizeEvent * )
{
m_bAwaitingRedraw=true;
- if(m_pixPixmap!=NULL)
- {
- delete m_pixPixmap;
- m_pixPixmap=NULL;
- }
+ delete m_pixPixmap;
+ m_pixPixmap=NULL;
}
void QtPLWidget::paintEvent( QPaintEvent * )
@@ -765,7 +762,7 @@
getPlotParameters(x_fact, y_fact, x_offset, y_offset);
if(m_bAwaitingRedraw || m_pixPixmap==NULL || m_listBuffer.size()!=m_iOldSize) // If must regenerate image, draw it in the pixmap
{
- if(m_pixPixmap!=NULL) delete m_pixPixmap;
+ delete m_pixPixmap;
m_pixPixmap=new QPixmap(width(), height());
QPainter* painter=new QPainter;
painter->begin(m_pixPixmap);
@@ -906,8 +903,8 @@
{
killed=true;
QCoreApplication::processEvents(QEventLoop::AllEvents, 10);
- if(m_pixPixmap!=NULL) delete m_pixPixmap;
- if(m_painterP!=NULL) delete m_painterP;
+ delete m_pixPixmap;
+ delete m_painterP;
// if(pic!=NULL) delete pic;
m_pixPixmap=NULL;
m_painterP=NULL;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|