fix [#27096] Segmentation Fault trying to export DirectX with specific model
authorCampbell Barton <ideasman42@gmail.com>
Thu, 21 Apr 2011 09:03:04 +0000 (09:03 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 21 Apr 2011 09:03:04 +0000 (09:03 +0000)
copying a mesh in editmode didnt NULL the edit_mesh pointer.

source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/particle.c

index 29ddd3a55e56202bf268def993046617e76532cb..ebbc18cdce95478cd2b1883e12e163bff10cfb53 100644 (file)
@@ -236,6 +236,8 @@ Mesh *copy_mesh(Mesh *me)
        }
        
        men->mselect= NULL;
+       men->edit_mesh= NULL;
+       men->pv= NULL; /* looks like this is no-longer supported but NULL just incase */
 
        men->bb= MEM_dupallocN(men->bb);
        
index ac9c46511a655ea394c0b1742d7e7026d49ddeb6..927f4863e2def81366325bc6a7e4a048e07c4be8 100644 (file)
@@ -264,7 +264,6 @@ static void psys_create_frand(ParticleSystem *psys)
 int psys_check_enabled(Object *ob, ParticleSystem *psys)
 {
        ParticleSystemModifierData *psmd;
-       Mesh *me;
 
        if(psys->flag & PSYS_DISABLED || psys->flag & PSYS_DELETE || !psys->part)
                return 0;