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:
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 088c85edc56..4ca1bbfde59 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;
}