Skip to content
Permalink
Browse files

Fix for bug #5877

  • Loading branch information
mhugent committed Jun 27, 2012
1 parent 8304d6a commit f383deae8cab8f85bb7f9e8de9d71fbe37fa4160
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/core/qgsrasterdataprovider.cpp
@@ -255,6 +255,11 @@ QgsRasterBandStats QgsRasterDataProvider::bandStatistics( int theBandNo )
myXBlockSize = xBlockSize();
myYBlockSize = yBlockSize();

if ( myXBlockSize == 0 || myYBlockSize == 0 )
{
return QgsRasterBandStats(); //invalid raster band stats
}

myNXBlocks = ( xSize() + myXBlockSize - 1 ) / myXBlockSize;
myNYBlocks = ( ySize() + myYBlockSize - 1 ) / myYBlockSize;

0 comments on commit f383dea

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