Skip to content

Commit

Permalink
Fix crash when grass provider is not available
Browse files Browse the repository at this point in the history
Fixes #21604
  • Loading branch information
nyalldawson committed Mar 20, 2019
1 parent 31ba9a1 commit d82298e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsmaplayerproxymodel.cpp
Expand Up @@ -117,7 +117,7 @@ bool QgsMapLayerProxyModel::filterAcceptsRow( int source_row, const QModelIndex
if ( mExceptList.contains( layer ) )
return false;

if ( mExcludedProviders.contains( layer->dataProvider()->name() ) )
if ( layer->dataProvider() && mExcludedProviders.contains( layer->dataProvider()->name() ) )
return false;

if ( mFilters.testFlag( WritableLayer ) && layer->readOnly() )
Expand Down

0 comments on commit d82298e

Please sign in to comment.