From 9ecb0b275e3abe319c6f69c9c9669ca12d177891 Mon Sep 17 00:00:00 2001 From: Blottiere Paul Date: Mon, 30 Apr 2018 10:24:53 +0100 Subject: [PATCH] Fixes crash when deleting last field from attribute table --- src/gui/qgsattributeform.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/qgsattributeform.cpp b/src/gui/qgsattributeform.cpp index 8532bcd48de8..3f4fefbf20d7 100644 --- a/src/gui/qgsattributeform.cpp +++ b/src/gui/qgsattributeform.cpp @@ -2011,6 +2011,9 @@ void QgsAttributeForm::ContainerInformation::apply( QgsExpressionContext *expres void QgsAttributeForm::updateJoinedFields( const QgsEditorWidgetWrapper &eww ) { + if ( !eww.layer()->fields().exists( eww.fieldIdx() ) ) + return; + QgsFeature formFeature; QgsField field = eww.layer()->fields().field( eww.fieldIdx() ); QList infos = eww.layer()->joinBuffer()->joinsWhereFieldIsId( field );