Fix T66862: crash with bevel modifier harden normals applied to curve object

This commit is contained in:
Brecht Van Lommel 2019-07-16 18:00:57 +02:00
parent 8a7dedc9d2
commit 35aa13734d
Notes: blender-bot 2023-02-14 09:43:37 +01:00
Referenced by issue #66862, Mirror Modifiers + Curve crash
1 changed files with 3 additions and 1 deletions

View File

@ -187,7 +187,9 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes
}
}
if (harden_normals && !(((Mesh *)ctx->object->data)->flag & ME_AUTOSMOOTH)) {
Object *ob = ctx->object;
if (harden_normals && (ob->type == OB_MESH) && !(((Mesh *)ob->data)->flag & ME_AUTOSMOOTH)) {
modifier_setError(md, "Enable 'Auto Smooth' option in mesh settings for hardening");
harden_normals = false;
}