Fix crash when relations would be recursively nested

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).
This commit is contained in:
Matthias Kuhn 2018-08-24 15:33:29 +02:00
parent a5a6f0058a
commit 4c52faa0df

View File

@ -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()