diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-12-20 14:04:11 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-12-20 14:04:11 +0300 |
commit | 7e16ac8190bf79f8d0b40f66a835288e62e6913e (patch) | |
tree | f2e6e9344a959b3acf90ba76d97a95c44d861f3e /source/blender/editors/util | |
parent | 4d16275c0369fb3857d3240af55318572c4b9813 (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.c | 9 |
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'); + } } } |