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
This commit is contained in:
Philipp Oeser 2019-08-15 11:39:45 +02:00
parent eac2a7ab0e
commit ff1ea600c9
Notes: blender-bot 2023-02-14 06:55:40 +01:00
Referenced by issue #68675, particle edit mode makes blender crash
1 changed files with 4 additions and 1 deletions

View File

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