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:
-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 */