Fix T64384 : Crash when switching to wireframe on tree_creature blend

Was missing NULL pointer check
This commit is contained in:
Clément Foucault 2019-05-09 14:36:49 +02:00
parent 39f78413fc
commit 54ec0559c8
Notes: blender-bot 2023-02-14 02:44:27 +01:00
Referenced by issue #64384, Crash when switching to wireframe on tree_creature blend from the website
1 changed files with 3 additions and 1 deletions

View File

@ -367,7 +367,9 @@ static void overlay_cache_populate(void *vedata, Object *ob)
*dupli_data = MEM_callocN(sizeof(OVERLAY_DupliData), "OVERLAY_DupliData");
}
else {
DRW_shgroup_call_object_add((*dupli_data)->shgrp, (*dupli_data)->geom, ob);
if ((*dupli_data)->shgrp && (*dupli_data)->geom) {
DRW_shgroup_call_object_add((*dupli_data)->shgrp, (*dupli_data)->geom, ob);
}
return;
}
}