Fix #135922: DRW: Blender crashes when saving a file

Was using the wrong viewport variable (that could be
nullptr) for the drawing.
This commit is contained in:
Clément Foucault
2025-03-13 16:26:55 +01:00
parent cdacaa0a13
commit dfb5be53cd

View File

@@ -1544,7 +1544,7 @@ void DRW_draw_render_loop_offscreen(Depsgraph *depsgraph,
BLI_assert(is_xr_surface == !is_image_render);
DRWContext::Mode mode = is_xr_surface ? DRWContext::VIEWPORT_XR : DRWContext::VIEWPORT_RENDER;
DRWContext draw_ctx(mode, depsgraph, viewport, nullptr, region, v3d);
DRWContext draw_ctx(mode, depsgraph, render_viewport, nullptr, region, v3d);
draw_ctx.acquire_data();
draw_ctx.options.draw_background = draw_background;