diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2019-08-15 12:39:45 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2019-08-15 12:56:57 +0300 |
commit | ff1ea600c98ba542c3b950fcfaf350626e078899 (patch) | |
tree | ebdf64dbdfd45af3d04c8e43507f5be1d48b609f /source/blender/draw/intern/draw_cache_impl_mesh.c | |
parent | eac2a7ab0ecd7fe90cd58213ca96004a1e6a6d33 (diff) |
Fix T68675: particle edit mode makes blender crash
In rB9c010c44f420, DRW_mesh_batch_cache_create_requested was changed to
take a scene (instead of toolsettings directly), but
DRW_draw_depth_object is calling this with with NULL, just checking for
this seems to fix...
Reviewers: fclem
Maniphest Tasks: T68675
Differential Revision: https://developer.blender.org/D5488
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl_mesh.c')
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl_mesh.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c index 8c89ac4703c..12c6a715685 100644 --- a/source/blender/draw/intern/draw_cache_impl_mesh.c +++ b/source/blender/draw/intern/draw_cache_impl_mesh.c @@ -969,7 +969,10 @@ void DRW_mesh_batch_cache_free_old(Mesh *me, int ctime) void DRW_mesh_batch_cache_create_requested( Object *ob, Mesh *me, const Scene *scene, const bool is_paint_mode, const bool use_hide) { - const ToolSettings *ts = scene->toolsettings; + const ToolSettings *ts = NULL; + if (scene) { + ts = scene->toolsettings; + } MeshBatchCache *cache = mesh_batch_cache_get(me); /* Early out */ |