Skip to content

Commit

Permalink
Delete on a 0 pointer is save
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@13092 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Mar 20, 2010
1 parent 527cdd7 commit 2394e50
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/app/gps/qgsgpsinformationwidget.cpp
Expand Up @@ -346,10 +346,7 @@ void QgsGPSInformationWidget::connected( QgsGPSConnection *conn )
void QgsGPSInformationWidget::disconnectGps()
{
QgsGPSConnectionRegistry::instance()->unregisterConnection( mNmea );
if ( mNmea )
{
delete mNmea;
}
delete mNmea;
mGPSTextEdit->append( tr( "Disconnected..." ) );
mConnectButton->setChecked( false );
mConnectButton->setText( tr( "Connect" ) );
Expand Down

0 comments on commit 2394e50

Please sign in to comment.