diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-10-06 12:19:47 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-10-06 12:30:23 +0400 |
commit | 9e53a97ddfbbe1bff3be585937318554f9c0eec6 (patch) | |
tree | 89eaca43c89c7c4466651278bce1ecf47ba599c1 /source/blender/editors | |
parent | 77af624524795fe6c6e50242adfe0da243f3c747 (diff) |
Fix T42093: segfault when trying to free unallocated depths zbuffer (border-zoom in 3DView).
Thanks to jensverwiebe (jens verwiebe) for investigations too!
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index cff6761d628..f54e7ae06f6 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -3423,7 +3423,7 @@ static int view3d_zoom_border_exec(bContext *C, wmOperator *op) /* find the closest Z pixel */ depth_close = view3d_depth_near(&depth_temp); - MEM_freeN(depth_temp.depths); + MEM_SAFE_FREE(depth_temp.depths); } cent[0] = (((double)rect.xmin) + ((double)rect.xmax)) / 2; @@ -4640,7 +4640,7 @@ static float view_autodist_depth_margin(ARegion *ar, const int mval[2], int marg view3d_update_depths_rect(ar, &depth_temp, &rect); depth_close = view3d_depth_near(&depth_temp); - if (depth_temp.depths) MEM_freeN(depth_temp.depths); + MEM_SAFE_FREE(depth_temp.depths); return depth_close; } |