Skip to content

Commit

Permalink
QgsRelation::isValid will return false if layers are deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Aug 24, 2018
1 parent 86e1382 commit 932e70a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsrelation.cpp
Expand Up @@ -326,7 +326,7 @@ QgsAttributeList QgsRelation::referencingFields() const

bool QgsRelation::isValid() const
{
return d->mValid;
return d->mValid && d->mReferencingLayer && d->mReferencedLayer;
}

bool QgsRelation::hasEqualDefinition( const QgsRelation &other ) const
Expand Down

0 comments on commit 932e70a

Please sign in to comment.