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:
authorGermano Cavalcante <germano.costa@ig.com.br>2021-06-22 14:12:59 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-06-22 14:25:32 +0300
commitab063db34d60bdda6a683b13cef36d93ad6e760f (patch)
treeba982105300099bf04f4c4bd95bd57e2aad51445 /source/blender/editors/physics/particle_edit.c
parent3f1111b2a82fe975fdb55114943009e8ef0a2c43 (diff)
Cleanup: deduplicate free code
It is more appropriate that `depths` is freed in `ED_view3d_depths_free`.
Diffstat (limited to 'source/blender/editors/physics/particle_edit.c')
-rw-r--r--source/blender/editors/physics/particle_edit.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index c0d035f36cf..2bf0f842623 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -525,14 +525,12 @@ static void PE_set_view3d_data(bContext *C, PEData *data)
ED_view3d_viewcontext_init(C, &data->vc, data->depsgraph);
if (!XRAY_ENABLED(data->vc.v3d)) {
- if (!(data->vc.v3d->runtime.flag & V3D_RUNTIME_DEPTHBUF_OVERRIDDEN)) {
- ED_view3d_depth_override(data->depsgraph,
- data->vc.region,
- data->vc.v3d,
- data->vc.obact,
- V3D_DEPTH_OBJECT_ONLY,
- &data->depths);
- }
+ ED_view3d_depth_override(data->depsgraph,
+ data->vc.region,
+ data->vc.v3d,
+ data->vc.obact,
+ V3D_DEPTH_OBJECT_ONLY,
+ &data->depths);
}
}
@@ -577,7 +575,6 @@ static void PE_data_free(PEData *data)
PE_free_shape_tree(data);
if (data->depths) {
ED_view3d_depths_free(data->depths);
- MEM_freeN(data->depths);
data->depths = NULL;
}
}