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 authored and github-actions[bot] committed Jan 30, 2021
1 parent c1ac6b8 commit 02b5b17
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/gui/vector/qgsattributesformproperties.cpp
Expand Up @@ -705,7 +705,8 @@ QgsAttributeEditorElement *QgsAttributesFormProperties::createAttributeEditorWid

}

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

return widgetDef;
}
Expand Down Expand Up @@ -845,7 +846,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 02b5b17

Please sign in to comment.