Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2007-11-15 01:56:32 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2007-11-15 01:56:32 +0300
commit0fae1fdad37780d8a376e94ce49db92d6776fc7c (patch)
treeb4d6ca071136d04418112d84199dbef8ee2293e3
parent41c675802734b8ab683065ee2688c4012f0fd26a (diff)
Bugfix:
Drawing linked duplicates in editmode leaked memory, and could also crash. This fixes the memory leak, and hopefully also the crash.
-rw-r--r--source/blender/src/drawimage.c2
-rw-r--r--source/blender/src/drawobject.c8
2 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/src/drawimage.c b/source/blender/src/drawimage.c
index f75de0bb331..e7a43086fa3 100644
--- a/source/blender/src/drawimage.c
+++ b/source/blender/src/drawimage.c
@@ -530,7 +530,7 @@ void draw_uvs_sima(void)
) {
/* we can use the existing final mesh */
glColor3ub(112, 112, 112);
- G.editMesh->derivedFinal->drawUVEdges(G.editMesh->derivedFinal);
+ em->derivedFinal->drawUVEdges(em->derivedFinal);
} else {
DerivedMesh *finalDM, *cageDM;
diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c
index f7fcb54297b..aa9afb2e7eb 100644
--- a/source/blender/src/drawobject.c
+++ b/source/blender/src/drawobject.c
@@ -2417,14 +2417,8 @@ 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);
- /* 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);
+ if (G.obedit!=ob && 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)) {