Skip to content

Commit cac6201

Browse files
committedOct 20, 2015
Fix crash with measure tool. Funded by Sourcepole QGIS Enterprise
1 parent 07fae8f commit cac6201

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
 

‎src/app/qgsmeasuredialog.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,11 @@ void QgsMeasureDialog::mouseMove( QgsPoint &point )
135135

136136
// Set moving
137137
QTreeWidgetItem *item = mTable->topLevelItem( mTable->topLevelItemCount() - 1 );
138-
item->setText( 0, QLocale::system().toString( d, 'f', mDecimalPlaces ) );
139-
QgsDebugMsg( QString( "Final result is %1" ).arg( item->text( 0 ) ) );
138+
if ( item )
139+
{
140+
item->setText( 0, QLocale::system().toString( d, 'f', mDecimalPlaces ) );
141+
QgsDebugMsg( QString( "Final result is %1" ).arg( item->text( 0 ) ) );
142+
}
140143
}
141144
}
142145

0 commit comments

Comments
 (0)
Please sign in to comment.