Skip to content

Commit

Permalink
Fix crash when changing raster data source
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 4, 2020
1 parent 012ee83 commit 5622564
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -7716,7 +7716,7 @@ void QgisApp::changeDataSource( QgsMapLayer *layer )
{
subsetString = vlayer->dataProvider()->subsetString();
}
if ( subsetString.isEmpty() )
if ( vlayer && subsetString.isEmpty() )
{
// actually -- the above isn't true in all situations. If a layer was invalid at the time
// that the subset string was set, then ONLY the layer has knowledge of this subset string!
Expand Down

0 comments on commit 5622564

Please sign in to comment.