Skip to content
Permalink
Browse files

Fixed a divde-by-zero error

  • Loading branch information
homann committed Sep 12, 2012
1 parent 3cb4669 commit c3e4ff7848eb31aac60fb1f1dd755ece1c5b2cd7
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/core/raster/qgsrasteriterator.cpp
@@ -63,6 +63,12 @@ bool QgsRasterIterator::readNextRasterPart( int bandNumber,

RasterPartInfo& pInfo = partIt.value();

// If we started with zero cols or zero rows, just return (avoids divide by zero below)
if ( 0 == pInfo.nCols || 0 == pInfo.nRows )
{
return false;
}

//remove last data block
// TODO: data are released somewhere else (check)
//free( pInfo.data );

0 comments on commit c3e4ff7

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