Skip to content

Commit 5812934

Browse files
committedJan 24, 2018
[bugfix] Fix crash on bad raster layers, fixes #17938
1 parent 097a437 commit 5812934

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12028,7 +12028,10 @@ QgsRasterLayer *QgisApp::addRasterLayerPrivate(
1202812028
// Let render() do its own cursor management
1202912029
// QApplication::restoreOverrideCursor();
1203012030
}
12031-
layer->loadDefaultMetadata( ok );
12031+
12032+
if ( layer )
12033+
layer->loadDefaultMetadata( ok );
12034+
1203212035
return layer;
1203312036

1203412037
} // QgisApp::addRasterLayer

0 commit comments

Comments
 (0)
Please sign in to comment.