[Bf-blender-cvs] [35aa13734db] master: Fix T66862: crash with bevel modifier harden normals applied to curve object

Brecht Van Lommel noreply at git.blender.org
Tue Jul 16 18:26:05 CEST 2019


Commit: 35aa13734db4e034e5f8f3252d82137cd9943f70
Author: Brecht Van Lommel
Date:   Tue Jul 16 18:00:57 2019 +0200
Branches: master
https://developer.blender.org/rB35aa13734db4e034e5f8f3252d82137cd9943f70

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

===================================================================

M	source/blender/modifiers/intern/MOD_bevel.c

===================================================================

diff --git a/source/blender/modifiers/intern/MOD_bevel.c b/source/blender/modifiers/intern/MOD_bevel.c
index 26b45bbef0d..2677f8ddfdd 100644
--- a/source/blender/modifiers/intern/MOD_bevel.c
+++ b/source/blender/modifiers/intern/MOD_bevel.c
@@ -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;
   }



More information about the Bf-blender-cvs mailing list