Fix #130720: Crash when saving blend file

Regions were created zero initialized in a couple places for rendering,
those need the region runtime reference.
This commit is contained in:
Hans Goudey
2024-11-22 08:19:56 -05:00
parent 01af6ffd22
commit 076e1150fc

View File

@@ -30,6 +30,7 @@
#include "BKE_object.hh"
#include "BKE_paint.hh"
#include "BKE_scene.hh"
#include "BKE_screen.hh"
#include "BKE_unit.hh"
#include "BLF_api.hh"
@@ -1785,6 +1786,8 @@ void ED_view3d_draw_offscreen_simple(Depsgraph *depsgraph,
{
View3D v3d = blender::dna::shallow_zero_initialize();
ARegion ar = {nullptr};
blender::bke::ARegionRuntime region_runtime{};
ar.runtime = &region_runtime;
RegionView3D rv3d = {{{0}}};
v3d.regionbase.first = v3d.regionbase.last = &ar;
@@ -2058,6 +2061,8 @@ ImBuf *ED_view3d_draw_offscreen_imbuf_simple(Depsgraph *depsgraph,
{
View3D v3d = blender::dna::shallow_zero_initialize();
ARegion region = {nullptr};
blender::bke::ARegionRuntime region_runtime{};
region.runtime = &region_runtime;
RegionView3D rv3d = {{{0}}};
/* connect data */