Skip to content

Commit

Permalink
Fix crash when changing raster data source
Browse files Browse the repository at this point in the history
Fixes #34231
  • Loading branch information
nyalldawson committed Feb 4, 2020
1 parent 1f79485 commit caf334e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
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 caf334e

Please sign in to comment.