Skip to content

Commit 76c6ec8

Browse files
committed
Prevent crash when fields are deleted from the vector options dialog
1 parent 4c8280a commit 76c6ec8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/qgsattributesformproperties.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ void QgsAttributesFormProperties::loadAttributeTypeDialog()
277277

278278
void QgsAttributesFormProperties::storeAttributeTypeDialog()
279279
{
280-
if ( mAttributeTypeDialog->fieldIdx() < 0 )
280+
if ( mAttributeTypeDialog->fieldIdx() < 0 || mAttributeTypeDialog->fieldIdx() >= mLayer->fields().count() )
281281
return;
282282

283283
FieldConfig cfg;

0 commit comments

Comments
 (0)