Skip to content

Commit

Permalink
fix crash with QgsAttributesFormProperties
Browse files Browse the repository at this point in the history
  • Loading branch information
vcloarec committed Jan 30, 2021
1 parent 91a2742 commit 36aae95
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/gui/vector/qgsattributesformproperties.cpp
Expand Up @@ -714,7 +714,8 @@ QgsAttributeEditorElement *QgsAttributesFormProperties::createAttributeEditorWid

}

widgetDef->setShowLabel( itemData.showLabel() );
if ( widgetDef )
widgetDef->setShowLabel( itemData.showLabel() );

return widgetDef;
}
Expand Down Expand Up @@ -854,7 +855,8 @@ void QgsAttributesFormProperties::apply()
{
QTreeWidgetItem *tabItem = mFormLayoutTree->invisibleRootItem()->child( t );
QgsAttributeEditorElement *editorElement { createAttributeEditorWidget( tabItem, nullptr, false ) };
editFormConfig.addTab( editorElement );
if ( editorElement )
editFormConfig.addTab( editorElement );
}

editFormConfig.setUiForm( mEditFormLineEdit->text() );
Expand Down

0 comments on commit 36aae95

Please sign in to comment.