Skip to content
Permalink
Browse files

fix #1682

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10753 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed May 7, 2009
1 parent acd619f commit 0d1ab92f8ba4af4e3240308752abf3eb3bb978a7
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/core/raster/qgsrasterlayer.cpp
@@ -712,7 +712,14 @@ const QgsRasterBandStats QgsRasterLayer::bandStatistics( int theBandNo )
QgsRasterBandStats myNullReturnStats;
return myNullReturnStats;
}

// check if we have previously gathered stats for this band...
if ( theBandNo < 1 || theBandNo > mRasterStatsList.size() )
{
// invalid band id, return nothing
QgsRasterBandStats myNullReturnStats;
return myNullReturnStats;
}

QgsRasterBandStats myRasterBandStats = mRasterStatsList[theBandNo - 1];
myRasterBandStats.bandNumber = theBandNo;

0 comments on commit 0d1ab92

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