mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Don't crash, please
This commit is contained in:
parent
308b16b163
commit
79f766afef
@ -23,12 +23,11 @@
|
||||
#include "qgsrelation_p.h"
|
||||
|
||||
QgsRelation::QgsRelation()
|
||||
: d( new QgsRelationPrivate() )
|
||||
{
|
||||
}
|
||||
|
||||
QgsRelation::~QgsRelation()
|
||||
{
|
||||
}
|
||||
QgsRelation::~QgsRelation() = default;
|
||||
|
||||
QgsRelation::QgsRelation( const QgsRelation &other )
|
||||
: d( other.d )
|
||||
@ -326,7 +325,7 @@ QgsAttributeList QgsRelation::referencingFields() const
|
||||
|
||||
bool QgsRelation::isValid() const
|
||||
{
|
||||
return d->mValid && d->mReferencingLayer && d->mReferencedLayer;
|
||||
return d->mValid && !d->mReferencingLayer.isNull() && !d->mReferencedLayer.isNull();
|
||||
}
|
||||
|
||||
bool QgsRelation::hasEqualDefinition( const QgsRelation &other ) const
|
||||
|
@ -39,7 +39,7 @@
|
||||
class QgsRelationPrivate : public QSharedData
|
||||
{
|
||||
public:
|
||||
QgsRelationPrivate();
|
||||
QgsRelationPrivate() = default;
|
||||
|
||||
//! Unique Id
|
||||
QString mRelationId;
|
||||
|
Loading…
x
Reference in New Issue
Block a user