Fix T64366 DRW: Crash opening Mr Elephant scene since recent commit

This commit is contained in:
Clément Foucault 2019-05-09 11:16:54 +02:00
parent a951aa5f62
commit c74e9273a9
Notes: blender-bot 2023-02-14 03:31:57 +01:00
Referenced by issue #64366, DRW: Crash opening Mr Elephant scene since recent commit
Referenced by issue #64326, Screw modifier on curves crash Blender 2.80
1 changed files with 4 additions and 0 deletions

View File

@ -3955,6 +3955,7 @@ GPUBatch *DRW_cache_cursor_get(bool crosshair_lines)
void drw_batch_cache_validate(Object *ob)
{
struct Mesh *mesh_eval = ob->runtime.mesh_eval;
switch (ob->type) {
case OB_MESH:
DRW_mesh_batch_cache_validate((Mesh *)ob->data);
@ -3962,6 +3963,9 @@ void drw_batch_cache_validate(Object *ob)
case OB_CURVE:
case OB_FONT:
case OB_SURF:
if (mesh_eval != NULL) {
DRW_mesh_batch_cache_validate(mesh_eval);
}
DRW_curve_batch_cache_validate((Curve *)ob->data);
break;
case OB_MBALL: