Fix T56344: Crash when used Twist for Emitter type of Particles System.

That effect is NOP with emitter particles anyway...
This commit is contained in:
Bastien Montagne 2018-08-13 11:57:18 +02:00
parent 9d59851ca3
commit 844b40b0c1
Notes: blender-bot 2023-02-14 11:28:43 +01:00
Referenced by issue #56344, Crash when used Twist for Emitter type of Particles System
1 changed files with 4 additions and 0 deletions

View File

@ -737,6 +737,10 @@ static void do_twist(const ParticleChildModifierContext *modifier_ctx,
ParticleTexture *ptex = modifier_ctx->ptex;
ParticleSettings *part = sim->psys->part;
/* Early output checks. */
if (modifier_ctx->parent_keys == NULL) {
/* Cannot get axis of rotation... */
return;
}
if (part->childtype != PART_CHILD_PARTICLES) {
/* Interpolated children behave weird with twist. */
return;