Skip to content

Commit

Permalink
[bugfix] Attribute table crashes QGIS when deleting selected
Browse files Browse the repository at this point in the history
Fixes https://issues.qgis.org/issues/16492

Needs-backporting
  • Loading branch information
elpaso committed May 11, 2017
1 parent 62bd07d commit db89929
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/gui/attributetable/qgsattributetabledelegate.cpp
Expand Up @@ -93,6 +93,13 @@ void QgsAttributeTableDelegate::setModelData( QWidget *editor, QAbstractItemMode
if ( !eww )
return;

// This fixes https://issues.qgis.org/issues/16492
if ( ! vl->getFeature( fid ).isValid( ) )
{
// Model is out of sync (again!).
return;
}

newValue = eww->value();

if ( ( oldValue != newValue && newValue.isValid() ) || oldValue.isNull() != newValue.isNull() )
Expand Down

0 comments on commit db89929

Please sign in to comment.