Skip to content
Permalink
Browse files

[Geometry checker] Fix crash in QgsGeometryCheckerResultTab::addError…

… if layerId is empty
  • Loading branch information
manisandro committed Oct 17, 2017
1 parent 5b2297f commit 3b6a0e2a1719f4d9f189af6bcbadf5b0e0d4c822
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/plugins/geometry_checker/qgsgeometrycheckerresulttab.cpp
@@ -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 ) );

0 comments on commit 3b6a0e2

Please sign in to comment.
You can’t perform that action at this time.