diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-12 17:17:05 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-12 17:17:05 +0300 |
commit | ec4ce908db6124037c4dfd927f22a9eec0ba4d52 (patch) | |
tree | 3318aa5a1103c0b88e16703bbb05794f2a5dac11 /source/blender/python | |
parent | a6585fa4b1a7a4dd4b5ea21efcee36c8460ff5ec (diff) |
Fix T55452: Crash on saving with visible particle system.
Missing Main pointer in recent refactor/cleanup of G.main usages...
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/intern/gpu_offscreen.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/python/intern/gpu_offscreen.c b/source/blender/python/intern/gpu_offscreen.c index 9022ecd2152..4520495a4b8 100644 --- a/source/blender/python/intern/gpu_offscreen.c +++ b/source/blender/python/intern/gpu_offscreen.c @@ -169,6 +169,7 @@ static PyObject *pygpu_offscreen_draw_view3d(BPy_GPUOffScreen *self, PyObject *a MatrixObject *py_mat_modelview, *py_mat_projection; PyObject *py_scene, *py_region, *py_view3d; + struct Main *bmain = G.main; /* XXX UGLY! */ Scene *scene; View3D *v3d; ARegion *ar; @@ -194,14 +195,14 @@ static PyObject *pygpu_offscreen_draw_view3d(BPy_GPUOffScreen *self, PyObject *a fx_settings = v3d->fx_settings; /* full copy */ - ED_view3d_draw_offscreen_init(G.main, scene, v3d); + ED_view3d_draw_offscreen_init(bmain, scene, v3d); rv3d_mats = ED_view3d_mats_rv3d_backup(ar->regiondata); GPU_offscreen_bind(self->ofs, true); /* bind */ ED_view3d_draw_offscreen( - scene, v3d, ar, GPU_offscreen_width(self->ofs), GPU_offscreen_height(self->ofs), + bmain, scene, v3d, ar, GPU_offscreen_width(self->ofs), GPU_offscreen_height(self->ofs), (float(*)[4])py_mat_modelview->matrix, (float(*)[4])py_mat_projection->matrix, false, true, true, "", fx, &fx_settings, |