Fix crash when adding skin modifier to empty mesh
authorNicholas Bishop <nicholasbishop@gmail.com>
Sun, 19 Aug 2012 17:13:45 +0000 (17:13 +0000)
committerNicholas Bishop <nicholasbishop@gmail.com>
Sun, 19 Aug 2012 17:13:45 +0000 (17:13 +0000)
Fixes bug [#32362] SIGSEGV when adding skin modifier to empty mesh
projects.blender.org/tracker/?func=detail&atid=498&aid=32362&group_id=9

source/blender/editors/object/object_modifier.c

index bbc7a6ace7d7a80b9271863a1084b636ea6f1a9a..2b1492aa7327d23072d67f693837bb2754e3f9d1 100644 (file)
@@ -1462,7 +1462,8 @@ static void modifier_skin_customdata_ensure(Object *ob)
                                          me->totvert);
 
                /* Mark an arbitrary vertex as root */
-               vs->flag |= MVERT_SKIN_ROOT;
+               if (vs)
+                       vs->flag |= MVERT_SKIN_ROOT;
        }
 }