Fix join information in clone

This commit is contained in:
Blottiere Paul 2017-09-04 06:05:07 +01:00
parent 51a52293ae
commit 94fde118a5

View File

@ -202,7 +202,8 @@ QgsVectorLayer *QgsVectorLayer::clone() const
Q_FOREACH ( const QgsVectorLayerJoinInfo &join, joins )
{
// do not copy join information for auxiliary layer
if ( auxiliaryLayer() && auxiliaryLayer()->id() != join.joinLayerId() )
if ( !auxiliaryLayer()
|| ( auxiliaryLayer() && auxiliaryLayer()->id() != join.joinLayerId() ) )
layer->addJoin( join );
}