diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-02-17 06:06:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-02-17 06:06:30 +0400 |
commit | 8a2bf0ba5498db16e11307fd2699815fb3b1cd3b (patch) | |
tree | d2f415015b79059e006b3c99fb3c5b678da0d3a0 /source/blender/editors/mesh/knifetool.c | |
parent | ad22305137c20b8429971c53e879bef4c49116d7 (diff) |
fix [#30220] Knife Tool Crashes Blender
though there is still a memory leak, but it looks like the leak may be in BLI_smallhash.c, not knife code.
Diffstat (limited to 'source/blender/editors/mesh/knifetool.c')
-rwxr-xr-x | source/blender/editors/mesh/knifetool.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/mesh/knifetool.c b/source/blender/editors/mesh/knifetool.c index df65093c23c..257c23cc0db 100755 --- a/source/blender/editors/mesh/knifetool.c +++ b/source/blender/editors/mesh/knifetool.c @@ -1698,8 +1698,7 @@ static void knifenet_fill_faces(knifetool_opdata *kcd) ListBase *face_nets = MEM_callocN(sizeof(ListBase)*bm->totface, "face_nets"); BMFace **faces = MEM_callocN(sizeof(BMFace *) * bm->totface, "faces knife"); MemArena *arena = BLI_memarena_new(1 << 16, "knifenet_fill_faces"); - SmallHash shash, *hash = &shash; - /* SmallHash shash2, *visited = &shash2; */ /* UNUSED */ + SmallHash shash; int i, j, k = 0, totface = bm->totface; BMO_push(bm, NULL); @@ -1800,6 +1799,7 @@ static void knifenet_fill_faces(knifetool_opdata *kcd) } for (i = 0; i < totface; i++) { + SmallHash *hash = &shash; EditFace *efa; EditVert *eve, *lasteve; int j; @@ -1932,7 +1932,6 @@ static void knifenet_fill_faces(knifetool_opdata *kcd) if (faces) MEM_freeN(faces); BLI_memarena_free(arena); - BLI_smallhash_release(hash); BMO_error_clear(bm); /* remerge_faces sometimes raises errors, so make sure to clear them */ |