Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix for bug #5877
  • Loading branch information
mhugent committed Jun 27, 2012
1 parent 8304d6a commit f383dea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/qgsrasterdataprovider.cpp
Expand Up @@ -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;

Expand Down

0 comments on commit f383dea

Please sign in to comment.