Fix T66862: crash with mirror modifier applied to curve object
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Tue, 16 Jul 2019 15:36:46 +0000 (17:36 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Tue, 16 Jul 2019 15:46:42 +0000 (17:46 +0200)
source/blender/modifiers/intern/MOD_mirror.c

index 857c69eab5089a847a5830832deda36c09e90b28..11f001d7a855f90f044c2e5853a3bffc1fe67b6d 100644 (file)
@@ -335,7 +335,7 @@ static Mesh *doMirrorOnAxis(MirrorModifierData *mmd,
   }
 
   /* handle custom split normals */
-  if ((((Mesh *)ob->data)->flag & ME_AUTOSMOOTH) &&
+  if (ob->type == OB_MESH && (((Mesh *)ob->data)->flag & ME_AUTOSMOOTH) &&
       CustomData_has_layer(&result->ldata, CD_CUSTOMLOOPNORMAL)) {
     const int totloop = result->totloop;
     const int totpoly = result->totpoly;