Skip to content

Commit db89929

Browse files
committedMay 11, 2017
[bugfix] Attribute table crashes QGIS when deleting selected
Fixes https://issues.qgis.org/issues/16492 Needs-backporting
1 parent 62bd07d commit db89929

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎src/gui/attributetable/qgsattributetabledelegate.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ void QgsAttributeTableDelegate::setModelData( QWidget *editor, QAbstractItemMode
9393
if ( !eww )
9494
return;
9595

96+
// This fixes https://issues.qgis.org/issues/16492
97+
if ( ! vl->getFeature( fid ).isValid( ) )
98+
{
99+
// Model is out of sync (again!).
100+
return;
101+
}
102+
96103
newValue = eww->value();
97104

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

0 commit comments

Comments
 (0)
Please sign in to comment.