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>2012-07-16 11:04:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-16 11:04:10 +0400
commit8e7aa500219ac71c9f36b0312508fa5f867e3690 (patch)
tree4648ecd08d902850f9409f82df0b337361515c47 /source/blender/blenkernel/intern/mask_rasterize.c
parent6f01b0b11fee61bf6f945eaaa2cf72f87a84a965 (diff)
fix crash for empty or single vertex layers.
Diffstat (limited to 'source/blender/blenkernel/intern/mask_rasterize.c')
-rw-r--r--source/blender/blenkernel/intern/mask_rasterize.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/mask_rasterize.c b/source/blender/blenkernel/intern/mask_rasterize.c
index dfdcad9cc43..991d58b01bf 100644
--- a/source/blender/blenkernel/intern/mask_rasterize.c
+++ b/source/blender/blenkernel/intern/mask_rasterize.c
@@ -617,10 +617,6 @@ void BLI_maskrasterize_handle_init(MaskRasterHandle *mr_handle, struct Mask *mas
sf_vert_tot++;
}
- if (diff_feather_points) {
- MEM_freeN(diff_feather_points);
- }
-
tot_feather_quads += tot_diff_point;
}
}
@@ -673,8 +669,6 @@ void BLI_maskrasterize_handle_init(MaskRasterHandle *mr_handle, struct Mask *mas
tot_feather_quads -= 2;
}
- MEM_freeN(diff_feather_points);
-
/* ack these are infact tris, but they are extra faces so no matter,
* +1 becausing adding one vert results in 2 tris (joining the existing endpoints)
*/
@@ -687,9 +681,13 @@ void BLI_maskrasterize_handle_init(MaskRasterHandle *mr_handle, struct Mask *mas
if (diff_points) {
MEM_freeN(diff_points);
}
+
+ if (diff_feather_points) {
+ MEM_freeN(diff_feather_points);
+ }
}
- if (sf_ctx.fillvertbase.first) {
+ {
unsigned int (*face_array)[4], *face; /* access coords */
float (*face_coords)[3], *cos; /* xy, z 0-1 (1.0 == filled) */
int sf_tri_tot;