Fix T56801: Enabling smoke crashes Blender.

This commit is contained in:
Clément Foucault 2018-09-17 11:31:07 +02:00
parent dc1e03b4a2
commit 5bf32f3337
Notes: blender-bot 2023-02-14 05:18:46 +01:00
Referenced by issue #56801, Enabling smoke crashes Blender.
1 changed files with 5 additions and 0 deletions

View File

@ -502,6 +502,11 @@ void EEVEE_volumes_cache_object_add(EEVEE_ViewLayerData *sldata, EEVEE_Data *ved
{
SmokeModifierData *smd = (SmokeModifierData *)md;
SmokeDomainSettings *sds = smd->domain;
if (sds == NULL) {
return;
}
/* Don't show smoke before simulation starts, this could be made an option in the future. */
const bool show_smoke = ((int)DEG_get_ctime(draw_ctx->depsgraph) >= sds->point_cache[0]->startframe);