Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Oeser <info@graphics-engineer.com>2019-08-15 12:39:45 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2019-08-15 12:56:57 +0300
commitff1ea600c98ba542c3b950fcfaf350626e078899 (patch)
treeebdf64dbdfd45af3d04c8e43507f5be1d48b609f
parenteac2a7ab0ecd7fe90cd58213ca96004a1e6a6d33 (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
-rw-r--r--source/blender/draw/intern/draw_cache_impl_mesh.c5
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 */