Navigation Menu

Skip to content

Commit

Permalink
Amend previous commit: call method after null-pointer check (sorry).
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@15489 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mmassing committed Mar 14, 2011
1 parent e9487ba commit 44fedd3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/providers/gdal/qgsgdalprovider.cpp
Expand Up @@ -150,13 +150,16 @@ QgsGdalProvider::QgsGdalProvider( QString const & uri )
GDALAutoCreateWarpedVRT( mGdalBaseDataset, NULL, NULL,
GRA_NearestNeighbour, 0.2, NULL );

GDALGetGeoTransform(mGdalDataset, mGeoTransform);
if ( mGdalDataset == NULL )
{
QgsLogger::warning( "Warped VRT Creation failed." );
mGdalDataset = mGdalBaseDataset;
GDALReferenceDataset( mGdalDataset );
}
else
{
GDALGetGeoTransform(mGdalDataset, mGeoTransform);
}
}
else
{
Expand Down

0 comments on commit 44fedd3

Please sign in to comment.