Skip to content

Commit

Permalink
Fix crash with measure tool. Funded by Sourcepole QGIS Enterprise
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Oct 20, 2015
1 parent 07fae8f commit cac6201
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/app/qgsmeasuredialog.cpp
Expand Up @@ -135,8 +135,11 @@ void QgsMeasureDialog::mouseMove( QgsPoint &point )

// Set moving
QTreeWidgetItem *item = mTable->topLevelItem( mTable->topLevelItemCount() - 1 );
item->setText( 0, QLocale::system().toString( d, 'f', mDecimalPlaces ) );
QgsDebugMsg( QString( "Final result is %1" ).arg( item->text( 0 ) ) );
if ( item )
{
item->setText( 0, QLocale::system().toString( d, 'f', mDecimalPlaces ) );
QgsDebugMsg( QString( "Final result is %1" ).arg( item->text( 0 ) ) );
}
}
}

Expand Down

0 comments on commit cac6201

Please sign in to comment.