[QGIS Commit] r15009 - branches/raster-providers/src/providers/gdal

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Jan 9 11:20:28 EST 2011


Author: jef
Date: 2011-01-09 08:20:28 -0800 (Sun, 09 Jan 2011)
New Revision: 15009

Modified:
   branches/raster-providers/src/providers/gdal/qgsgdalprovider.cpp
Log:
fix crash

Modified: branches/raster-providers/src/providers/gdal/qgsgdalprovider.cpp
===================================================================
--- branches/raster-providers/src/providers/gdal/qgsgdalprovider.cpp	2011-01-09 12:55:14 UTC (rev 15008)
+++ branches/raster-providers/src/providers/gdal/qgsgdalprovider.cpp	2011-01-09 16:20:28 UTC (rev 15009)
@@ -88,7 +88,7 @@
 
   QgsDebugMsg ("GdalDataset opened" );
 
-  for ( int i = 0; i < GDALGetRasterCount( mGdalDataset ); i++ )
+  for ( int i = 0; i < GDALGetRasterCount( mGdalBaseDataset ); i++ )
   {
     mMinMaxComputed.append(false);
     mMinimum.append(0);
@@ -214,7 +214,7 @@
     // But we need a null value in case of reprojection and BTW also for 
     // aligned margines
 
-    switch ( dataType( 0 ) ) {
+    switch ( dataType( 1 ) ) {
       case QgsRasterDataProvider::Byte:
         mNoDataValue = 255.0;
         break;



More information about the QGIS-commit mailing list