diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-09-28 00:41:56 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-09-28 00:41:56 +0400 |
commit | 18bd726f0b040f00ba64bf4c4106deea872201a9 (patch) | |
tree | f321c19f0c0ed7b93e2e971803e5daac1af082e5 /source/blender/src/drawobject.c | |
parent | 0345b3b221568d9c29665397ef42496c8199a05e (diff) |
bugfix from 11860, the derived mesh was getting free'd twice (crashed
editmode + linked-dupes + texture-drawtype)
Also fixed own bug with face mode setting (wasnt checking for texface)
Diffstat (limited to 'source/blender/src/drawobject.c')
-rw-r--r-- | source/blender/src/drawobject.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c index 6be61478593..f637734fa34 100644 --- a/source/blender/src/drawobject.c +++ b/source/blender/src/drawobject.c @@ -2410,9 +2410,14 @@ static int draw_mesh_object(Base *base, int dt, int flag) if(dt>OB_WIRE) init_gl_materials(ob, 0); // no transp in editmode, the fancy draw over goes bad then draw_em_fancy(ob, G.editMesh, cageDM, finalDM, dt); - if (cageDM != finalDM) + /* TODO, not 100% sure this is correct, + * however I could not make it crash or leak ram with different + * linked-dup/modifier configurtions, + * should double check whats going on before release - Campbell */ + if (cageDM != finalDM) { cageDM->release(cageDM); - finalDM->release(finalDM); + finalDM->release(finalDM); + } } else if(!G.obedit && (G.f & G_SCULPTMODE) &&(G.scene->sculptdata.flags & SCULPT_DRAW_FAST) && OBACT==ob && !sculpt_modifiers_active(ob)) { |