Skip to content

Commit f1ed843

Browse files
author
mhugent
committed
Delete on a 0 pointer is save
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13092 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 9ec81a6 commit f1ed843

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/app/gps/qgsgpsinformationwidget.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -346,10 +346,7 @@ void QgsGPSInformationWidget::connected( QgsGPSConnection *conn )
346346
void QgsGPSInformationWidget::disconnectGps()
347347
{
348348
QgsGPSConnectionRegistry::instance()->unregisterConnection( mNmea );
349-
if ( mNmea )
350-
{
351-
delete mNmea;
352-
}
349+
delete mNmea;
353350
mGPSTextEdit->append( tr( "Disconnected..." ) );
354351
mConnectButton->setChecked( false );
355352
mConnectButton->setText( tr( "Connect" ) );

0 commit comments

Comments
 (0)