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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user