Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed a divde-by-zero error
  • Loading branch information
homann committed Sep 12, 2012
1 parent 3cb4669 commit c3e4ff7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/raster/qgsrasteriterator.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit c3e4ff7

Please sign in to comment.