Skip to content

Commit

Permalink
Fix crash when relations would be recursively nested
Browse files Browse the repository at this point in the history
There is already code, that avoids building up widgets in such a situation. With this patch
it also avoids recursively calling methods on relations which are hidden (because of nesting or other reasons).
  • Loading branch information
m-kuhn committed Aug 24, 2018
1 parent a5a6f00 commit 4c52faa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/editorwidgets/qgsrelationwidgetwrapper.cpp
Expand Up @@ -48,7 +48,7 @@ void QgsRelationWidgetWrapper::setVisible( bool visible )

void QgsRelationWidgetWrapper::aboutToSave()
{
if ( !mRelation.isValid() )
if ( !mRelation.isValid() || !widget() || !widget()->isVisible() )
return;

// Calling isModified() will emit a beforeModifiedCheck()
Expand Down

0 comments on commit 4c52faa

Please sign in to comment.