Skip to content

Commit

Permalink
Add safety check
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and nyalldawson committed Jul 12, 2020
1 parent a9dbc88 commit ecef38f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/core/qgsvectorlayerjoininfo.cpp
Expand Up @@ -100,11 +100,15 @@ QStringList QgsVectorLayerJoinInfo::joinFieldNamesSubset( const QgsVectorLayerJo
}
else
{
for ( const QgsField &f : info.joinLayer()->fields() )
if ( info.joinLayer() )
{
if ( !info.joinFieldNamesBlockList().contains( f.name() )
&& f.name() != info.joinFieldName() )
fieldNames.append( f.name() );
const QgsFields fields { info.joinLayer()->fields() };
for ( const QgsField &f : fields )
{
if ( !info.joinFieldNamesBlockList().contains( f.name() )
&& f.name() != info.joinFieldName() )
fieldNames.append( f.name() );
}
}
}
}
Expand Down

0 comments on commit ecef38f

Please sign in to comment.