mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Fix a crash when rendering a raster outside of its extent
If QgsRasterLayerRenderer constructor exists prematurely because there is nothing to render, its internal pointers end up null, but forceRasterRender() was expecting that mPipe was always allocated. The crash was introduced recently in #50382
This commit is contained in:
parent
354e38df48
commit
9e853bd415
@ -371,6 +371,9 @@ QgsFeedback *QgsRasterLayerRenderer::feedback() const
|
||||
|
||||
bool QgsRasterLayerRenderer::forceRasterRender() const
|
||||
{
|
||||
if ( !mRasterViewPort || !mPipe )
|
||||
return false; // this layer is not going to get rendered
|
||||
|
||||
// preview of intermediate raster rendering results requires a temporary output image
|
||||
if ( renderContext()->testFlag( Qgis::RenderContextFlag::RenderPartialOutput ) )
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user