Skip to content
Permalink
Browse files

Fix crash with 2-band rasters

  • Loading branch information
wonder-sk committed Jul 10, 2018
1 parent 2688a9d commit a9c017de903a69b5bcace5db9ff4efdf7092fb65
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/raster/qgsmultibandcolorrenderer.cpp
@@ -228,7 +228,7 @@ QgsRasterBlock *QgsMultiBandColorRenderer::block( int bandNo, QgsRectangle cons
QRgb *outputBlockColorData = outputBlock->colorData();

// faster data access to data for the common case that input data are coming from RGB image with 8-bit bands
bool hasByteRgb = ( redBlock->dataType() == Qgis::Byte && greenBlock->dataType() == Qgis::Byte && blueBlock->dataType() == Qgis::Byte );
bool hasByteRgb = ( redBlock && greenBlock && blueBlock && redBlock->dataType() == Qgis::Byte && greenBlock->dataType() == Qgis::Byte && blueBlock->dataType() == Qgis::Byte );
const quint8 *redData = nullptr, *greenData = nullptr, *blueData = nullptr;
if ( hasByteRgb )
{

0 comments on commit a9c017d

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