DRW: Fix Crash in DRW_draw_depth_object when object batch cache is not init
This can happen if the viewport is not redrawn before calling an operator (frequent in python scripting). Related to T64805
This commit is contained in:
parent
2698544db2
commit
28fee762ae
|
@ -2590,6 +2590,8 @@ void DRW_draw_depth_object(ARegion *ar, GPUViewport *viewport, Object *object)
|
|||
world_clip_planes = rv3d->clip_local;
|
||||
}
|
||||
|
||||
drw_batch_cache_validate(object);
|
||||
|
||||
switch (object->type) {
|
||||
case OB_MESH: {
|
||||
GPUBatch *batch;
|
||||
|
|
Loading…
Reference in New Issue