Skip to content
Permalink
Browse files

Fix crash when changing raster data source

Fixes #34231
  • Loading branch information
nyalldawson committed Feb 4, 2020
1 parent 1f79485 commit caf334e65b11f9ee1590f74fe395e97d92bbe699
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/app/qgisapp.cpp
@@ -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!

0 comments on commit caf334e

Please sign in to comment.
You can’t perform that action at this time.