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:
authorCampbell Barton <ideasman42@gmail.com>2008-06-10 14:26:13 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-06-10 14:26:13 +0400
commit70453c9e809eb92c6dfbd40949daa5dd792d8e28 (patch)
tree177a2d90755e78f8e905346444bd8902a4a66961 /source/blender/src/editmesh_lib.c
parentf72d450ae99927e7240f62900af4608a5db2d664 (diff)
bugfix, missing calls to free editmesh index arrays
Diffstat (limited to 'source/blender/src/editmesh_lib.c')
-rw-r--r--source/blender/src/editmesh_lib.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/src/editmesh_lib.c b/source/blender/src/editmesh_lib.c
index 6251ba1a650..4d9679b6b8a 100644
--- a/source/blender/src/editmesh_lib.c
+++ b/source/blender/src/editmesh_lib.c
@@ -2199,18 +2199,25 @@ UvVertMap *make_uv_vert_map_EM(int selected, int do_face_idx_array, float *limit
if(!selected || ((!efa->h) && (efa->f & SELECT)))
totuv += (efa->v4)? 4: 3;
- if(totuv==0)
+ if(totuv==0) {
+ if (do_face_idx_array)
+ EM_free_index_arrays();
return NULL;
-
+ }
vmap= (UvVertMap*)MEM_callocN(sizeof(*vmap), "UvVertMap");
- if (!vmap)
+ if (!vmap) {
+ if (do_face_idx_array)
+ EM_free_index_arrays();
return NULL;
+ }
vmap->vert= (UvMapVert**)MEM_callocN(sizeof(*vmap->vert)*totverts, "UvMapVert*");
buf= vmap->buf= (UvMapVert*)MEM_callocN(sizeof(*vmap->buf)*totuv, "UvMapVert");
if (!vmap->vert || !vmap->buf) {
free_uv_vert_map(vmap);
+ if (do_face_idx_array)
+ EM_free_index_arrays();
return NULL;
}