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

This commit is contained in:
2019-05-09 11:16:54 +02:00
parent a951aa5f62
commit c74e9273a9

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: