Navigation Menu

Skip to content

Commit

Permalink
[Geometry checker] Fix crash in QgsGeometryCheckerResultTab::addError…
Browse files Browse the repository at this point in the history
… if layerId is empty
  • Loading branch information
manisandro committed Oct 23, 2017
1 parent 5b2297f commit 3b6a0e2
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -148,7 +148,7 @@ void QgsGeometryCheckerResultTab::addError( QgsGeometryCheckError *error )
ui.tableWidgetErrors->insertRow( row );
QTableWidgetItem *idItem = new QTableWidgetItem();
idItem->setData( Qt::EditRole, error->featureId() != FEATUREID_NULL ? QVariant( error->featureId() ) : QVariant() );
ui.tableWidgetErrors->setItem( row, 0, new QTableWidgetItem( mChecker->getContext()->featurePools[error->layerId()]->getLayer()->name() ) );
ui.tableWidgetErrors->setItem( row, 0, new QTableWidgetItem( !error->layerId().isEmpty() ? mChecker->getContext()->featurePools[error->layerId()]->getLayer()->name() : "" ) );
ui.tableWidgetErrors->setItem( row, 1, idItem );
ui.tableWidgetErrors->setItem( row, 2, new QTableWidgetItem( error->description() ) );
ui.tableWidgetErrors->setItem( row, 3, new QTableWidgetItem( posStr ) );
Expand Down

0 comments on commit 3b6a0e2

Please sign in to comment.