Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix crash when opening attribute form
  • Loading branch information
vcloarec authored and github-actions[bot] committed Nov 30, 2021
1 parent 345e59c commit f661701
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/qgsattributeform.cpp
Expand Up @@ -1643,7 +1643,8 @@ void QgsAttributeForm::init()
label->setBuddy( widgetInfo.widget );

// If at least one expanding widget is present do not add a spacer
if ( widgetInfo.widget->sizePolicy().verticalPolicy() != QSizePolicy::Fixed
if ( widgetInfo.widget
&& widgetInfo.widget->sizePolicy().verticalPolicy() != QSizePolicy::Fixed
&& widgetInfo.widget->sizePolicy().verticalPolicy() != QSizePolicy::Maximum
&& widgetInfo.widget->sizePolicy().verticalPolicy() != QSizePolicy::Preferred )
addSpacer = false;
Expand Down

0 comments on commit f661701

Please sign in to comment.