QgsRelation::isValid will return false if layers are deleted

This commit is contained in:
Matthias Kuhn 2018-08-24 13:20:06 +02:00
parent 86e1382fb0
commit 932e70a756

View File

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