Skip to content

Commit

Permalink
Fix memory leak in multiband color renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Jul 16, 2013
1 parent 6b6742b commit 9093bcd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/raster/qgsmultibandcolorrenderer.cpp
Expand Up @@ -309,9 +309,11 @@ QgsRasterBlock* QgsMultiBandColorRenderer::block( int bandNo, QgsRectangle cons
} }
} }


for ( int i = 0; i < bandBlocks.size(); i++ ) //delete input blocks
QMap<int, QgsRasterBlock*>::const_iterator bandDelIt = bandBlocks.constBegin();
for ( ; bandDelIt != bandBlocks.constEnd(); ++bandDelIt )
{ {
delete bandBlocks.value( i ); delete bandDelIt.value();
} }


return outputBlock; return outputBlock;
Expand Down

0 comments on commit 9093bcd

Please sign in to comment.