Skip to content

Commit

Permalink
Fixed crash when reading project file with non-existing raster file
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@7936 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
homann committed Jan 12, 2008
1 parent c7ea9f3 commit 4f05135
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/core/raster/qgsrasterlayer.cpp
Expand Up @@ -423,8 +423,11 @@ QgsRasterLayer::~QgsRasterLayer()

if (mProviderKey.isEmpty())
{
mGdalBaseDataset->Dereference();
GDALClose(mGdalDataset);
if ( mGdalBaseDataset )
{
mGdalBaseDataset->Dereference();
GDALClose(mGdalDataset);
}
}
}

Expand Down

0 comments on commit 4f05135

Please sign in to comment.