Fix: Potential crash with null simulation cache during playback

The cache is typically supposed to be non-null, but I did observe
that in testing, and the null check doesn't really hurt here.
This commit is contained in:
Hans Goudey
2023-07-11 08:06:03 -04:00
parent 424c6edc53
commit 6fbe0e27ca

View File

@@ -638,6 +638,9 @@ static void prepare_simulation_states_for_evaluation(const NodesModifierData &nm
const ModifierEvalContext &ctx,
nodes::GeoNodesModifierData &exec_data)
{
if (!nmd.runtime->simulation_cache) {
return;
}
const Main *bmain = DEG_get_bmain(ctx.depsgraph);
const SubFrame current_frame = DEG_get_ctime(ctx.depsgraph);
const Scene *scene = DEG_get_input_scene(ctx.depsgraph);