Skip to content
Permalink
Browse files

fix #1682

git-svn-id: http://svn.osgeo.org/qgis/trunk@10753 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed May 7, 2009
1 parent af1e220 commit 4b4c9547e2683e32bc25aa881b1d3b64614a29c1
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 4b4c954

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