We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8304d6a commit f383deaCopy full SHA for f383dea
src/core/qgsrasterdataprovider.cpp
@@ -255,6 +255,11 @@ QgsRasterBandStats QgsRasterDataProvider::bandStatistics( int theBandNo )
255
myXBlockSize = xBlockSize();
256
myYBlockSize = yBlockSize();
257
258
+ if ( myXBlockSize == 0 || myYBlockSize == 0 )
259
+ {
260
+ return QgsRasterBandStats(); //invalid raster band stats
261
+ }
262
+
263
myNXBlocks = ( xSize() + myXBlockSize - 1 ) / myXBlockSize;
264
myNYBlocks = ( ySize() + myYBlockSize - 1 ) / myYBlockSize;
265
0 commit comments