Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix crash when changing to paletted renderer (with no colors)
  • Loading branch information
wonder-sk committed Jun 5, 2014
1 parent b12874b commit 6de2cdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/raster/qgspalettedrasterrenderer.cpp
Expand Up @@ -155,7 +155,7 @@ void QgsPalettedRasterRenderer::setLabel( int idx, QString label )
QgsRasterBlock * QgsPalettedRasterRenderer::block( int bandNo, QgsRectangle const & extent, int width, int height )
{
QgsRasterBlock *outputBlock = new QgsRasterBlock();
if ( !mInput )
if ( !mInput || mNColors == 0 )
{
return outputBlock;
}
Expand Down

0 comments on commit 6de2cdf

Please sign in to comment.