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

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;
}