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:
authorJoshua Leung <aligorith@gmail.com>2009-12-20 14:04:11 +0300
committerJoshua Leung <aligorith@gmail.com>2009-12-20 14:04:11 +0300
commit7e16ac8190bf79f8d0b40f66a835288e62e6913e (patch)
treef2e6e9344a959b3acf90ba76d97a95c44d861f3e /source/blender/editors/util
parent4d16275c0369fb3857d3240af55318572c4b9813 (diff)
Fixes for memory leaks when exiting Blender while still in WeightPaint Mode.
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r--source/blender/editors/util/ed_util.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c
index fc2576eef5d..e02eeebef7e 100644
--- a/source/blender/editors/util/ed_util.c
+++ b/source/blender/editors/util/ed_util.c
@@ -87,9 +87,16 @@ void ED_editors_exit(bContext *C)
// else if(ob->type==OB_MBALL)
// BLI_freelistN(&editelems);
// free_editLatt();
- // free_posebuf();
+ // free_posebuf(); // XXX this is still a global...
}
}
+ else if(sce->basact && sce->basact->object) {
+ Object *ob= sce->basact->object;
+
+ /* if weight-painting is on, free mesh octree data */
+ if(ob->mode & OB_MODE_WEIGHT_PAINT)
+ mesh_octree_table(ob, NULL, NULL, 'e');
+ }
}
}