Skip to content
Permalink
Browse files

Fix #11455 take two (raster crashes)

Thanks to Nyall for pointing this out
  • Loading branch information
wonder-sk committed Oct 23, 2014
1 parent d833c22 commit 691f4a2858665d191a307c3984891376c24a0d0b
@@ -57,7 +57,7 @@ QgsRasterInterface * QgsMultiBandColorRenderer::clone() const
}
renderer->setOpacity( mOpacity );
renderer->setAlphaBand( mAlphaBand );
renderer->setRasterTransparency( new QgsRasterTransparency( *mRasterTransparency ) );
renderer->setRasterTransparency( mRasterTransparency ? new QgsRasterTransparency( *mRasterTransparency ) : 0 );

return renderer;
}
@@ -51,7 +51,7 @@ QgsRasterInterface * QgsPalettedRasterRenderer::clone() const
QgsPalettedRasterRenderer * renderer = new QgsPalettedRasterRenderer( 0, mBand, rgbArray(), mNColors );
renderer->setOpacity( mOpacity );
renderer->setAlphaBand( mAlphaBand );
renderer->setRasterTransparency( new QgsRasterTransparency( *mRasterTransparency ) );
renderer->setRasterTransparency( mRasterTransparency ? new QgsRasterTransparency( *mRasterTransparency ) : 0 );
renderer->mLabels = mLabels;
return renderer;
}
@@ -37,7 +37,7 @@ QgsRasterInterface * QgsSingleBandColorDataRenderer::clone() const
QgsSingleBandColorDataRenderer * renderer = new QgsSingleBandColorDataRenderer( 0, mBand );
renderer->setOpacity( mOpacity );
renderer->setAlphaBand( mAlphaBand );
renderer->setRasterTransparency( new QgsRasterTransparency( *mRasterTransparency ) );
renderer->setRasterTransparency( mRasterTransparency ? new QgsRasterTransparency( *mRasterTransparency ) : 0 );
return renderer;
}

@@ -37,7 +37,7 @@ QgsRasterInterface * QgsSingleBandGrayRenderer::clone() const
QgsSingleBandGrayRenderer * renderer = new QgsSingleBandGrayRenderer( 0, mGrayBand );
renderer->setOpacity( mOpacity );
renderer->setAlphaBand( mAlphaBand );
renderer->setRasterTransparency( new QgsRasterTransparency( *mRasterTransparency ) );
renderer->setRasterTransparency( mRasterTransparency ? new QgsRasterTransparency( *mRasterTransparency ) : 0 );
renderer->setGradient( mGradient );
if ( mContrastEnhancement )
{
@@ -63,7 +63,7 @@ QgsRasterInterface * QgsSingleBandPseudoColorRenderer::clone() const

renderer->setOpacity( mOpacity );
renderer->setAlphaBand( mAlphaBand );
renderer->setRasterTransparency( new QgsRasterTransparency( *mRasterTransparency ) );
renderer->setRasterTransparency( mRasterTransparency ? new QgsRasterTransparency( *mRasterTransparency ) : 0 );

return renderer;
}

0 comments on commit 691f4a2

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