Fix T52782: crash rendering more virtual parent particles than children

This commit is contained in:
Brecht Van Lommel 2020-05-14 03:42:09 +02:00
parent ec324d8741
commit 27ef012ac7
Notes: blender-bot 2023-02-14 09:24:53 +01:00
Referenced by issue #52782, F12 and crash
1 changed files with 2 additions and 1 deletions

View File

@ -2383,9 +2383,10 @@ static bool psys_thread_context_init_path(ParticleThreadContext *ctx,
}
else {
totchild = (int)((float)totchild * (float)part->disp / 100.0f);
totparent = MIN2(totparent, totchild);
}
totparent = MIN2(totparent, totchild);
if (totchild == 0) {
return false;
}