fix for missing NULL check in own recent commit, thanks Gaia for pointing this out.
authorCampbell Barton <ideasman42@gmail.com>
Wed, 12 Sep 2012 23:19:08 +0000 (23:19 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 12 Sep 2012 23:19:08 +0000 (23:19 +0000)
source/blender/editors/object/object_bake.c
source/blender/modifiers/intern/MOD_particleinstance.c

index c0dd911946b1b973a15e0e991b93329bc3476a8b..f9b73a564031d4a5e251eee560cd87d9b47f0f48 100644 (file)
@@ -1377,9 +1377,11 @@ static void finish_bake_internal(BakeRender *bkr)
                }
 
                /* freed when baking is done, but if its canceled we need to free here */
-               if (ibuf->userdata) {
-                       MEM_freeN(ibuf->userdata);
-                       ibuf->userdata = NULL;
+               if (ibuf) {
+                       if (ibuf->userdata) {
+                               MEM_freeN(ibuf->userdata);
+                               ibuf->userdata = NULL;
+                       }
                }
        }
 }
index d46ef3c3fc4d6021af3678c9f2df4c3f427edd14..e64e80efde37bb69f4ff136e3d5833ea053798e5 100644 (file)
@@ -152,7 +152,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
        MPoly *mpoly, *orig_mpoly;
        MLoop *mloop, *orig_mloop;
        MVert *mvert, *orig_mvert;
-       int totvert, totpoly, totloop, totedge;
+       int totvert, totpoly, totloop /* , totedge */;
        int maxvert, maxpoly, maxloop, totpart = 0, first_particle = 0;
        int k, p, p_skip;
        short track = ob->trackflag % 3, trackneg, axis = pimd->axis;
@@ -210,7 +210,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
        totvert = dm->getNumVerts(dm);
        totpoly = dm->getNumPolys(dm);
        totloop = dm->getNumLoops(dm);
-       totedge = dm->getNumEdges(dm);
+       /* totedge = dm->getNumEdges(dm); */ /* UNUSED */
 
        /* count particles */
        maxvert = 0;