Skip to content

Commit

Permalink
Prevent crash when fields are deleted from the vector options dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Feb 20, 2019
1 parent 4c8280a commit 76c6ec8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/qgsattributesformproperties.cpp
Expand Up @@ -277,7 +277,7 @@ void QgsAttributesFormProperties::loadAttributeTypeDialog()

void QgsAttributesFormProperties::storeAttributeTypeDialog()
{
if ( mAttributeTypeDialog->fieldIdx() < 0 )
if ( mAttributeTypeDialog->fieldIdx() < 0 || mAttributeTypeDialog->fieldIdx() >= mLayer->fields().count() )
return;

FieldConfig cfg;
Expand Down

0 comments on commit 76c6ec8

Please sign in to comment.