fix for crash when multires subdividing a mesh with no faces (new bug in bmesh grr!)
authorCampbell Barton <ideasman42@gmail.com>
Sat, 28 Apr 2012 07:00:53 +0000 (07:00 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 28 Apr 2012 07:00:53 +0000 (07:00 +0000)
source/blender/blenkernel/intern/multires.c

index e2142c393a5db653193be42d4caada9347de60b5..d7212e5eaf9f25b79e23ce24e0d6a1a197f61acf 100644 (file)
@@ -835,7 +835,7 @@ static void multires_subdivide(MultiresModifierData *mmd, Object *ob, int totlvl
        MDisps *mdisps;
        int lvl= mmd->totlvl;
 
-       if (totlvl > multires_max_levels)
+       if ((totlvl > multires_max_levels) || (me->totpoly == 0))
                return;
 
        multires_force_update(ob);