Skip to content

Commit

Permalink
Merge pull request #41268 from vcloarec/fixCrashattributeformproperties
Browse files Browse the repository at this point in the history
fix crash with QgsAttributesFormProperties
  • Loading branch information
m-kuhn committed Jan 30, 2021
2 parents a4924b4 + 36aae95 commit 7625a21
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 7625a21

Please sign in to comment.