Cleanup: deduplicate free code

It is more appropriate that `depths` is freed in `ED_view3d_depths_free`.
This commit is contained in:
2021-06-22 08:12:59 -03:00
parent 3f1111b2a8
commit ab063db34d
5 changed files with 15 additions and 13 deletions

View File

@@ -1019,7 +1019,7 @@ static float view_autodist_depth_margin(ARegion *region, const int mval[2], int
ViewDepths depth_temp = {0};
view3d_depths_rect_create(region, &rect, &depth_temp);
float depth_close = view3d_depth_near(&depth_temp);
ED_view3d_depths_free(&depth_temp);
MEM_SAFE_FREE(depth_temp.depths);
return depth_close;
}