Skip to content

Commit

Permalink
Fix missing mapserver legends in some circumstances
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 7, 2019
1 parent 75e2252 commit 4a60e18
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/providers/arcgisrest/qgsamsprovider.cpp
Expand Up @@ -108,7 +108,9 @@ void QgsAmsLegendFetcher::handleFinished()
{
QVariantMap queryResultMap = result.toMap();
QString layerId = queryResultMap[QStringLiteral( "layerId" )].toString();
if ( layerId != dataSource.param( QStringLiteral( "layer" ) ) && !mProvider->subLayers().contains( layerId ) )
if ( !dataSource.param( QStringLiteral( "layer" ) ).isNull()
&& layerId != dataSource.param( QStringLiteral( "layer" ) )
&& !mProvider->subLayers().contains( layerId ) )
{
continue;
}
Expand Down

0 comments on commit 4a60e18

Please sign in to comment.