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>2021-08-06 06:59:38 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-08-06 07:24:16 +0300
commitbc97d7832906318a1185b3fb460b1d8d89020ba0 (patch)
tree096969472b2a5ad82c56d8f616cd398f47840bdf /source/blender/editors/uvedit/uvedit_smart_stitch.c
parent99738fbfdc8b4639d95c796bcc8711bd89c1aaa4 (diff)
Cleanup: use MEM_SAFE_FREE macro
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_smart_stitch.c')
-rw-r--r--source/blender/editors/uvedit/uvedit_smart_stitch.c25
1 files changed, 5 insertions, 20 deletions
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c
index 1bcd1fad9d6..c5485cc1495 100644
--- a/source/blender/editors/uvedit/uvedit_smart_stitch.c
+++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c
@@ -265,26 +265,11 @@ static StitchPreviewer *stitch_preview_init(void)
static void stitch_preview_delete(StitchPreviewer *stitch_preview)
{
if (stitch_preview) {
- if (stitch_preview->preview_polys) {
- MEM_freeN(stitch_preview->preview_polys);
- stitch_preview->preview_polys = NULL;
- }
- if (stitch_preview->uvs_per_polygon) {
- MEM_freeN(stitch_preview->uvs_per_polygon);
- stitch_preview->uvs_per_polygon = NULL;
- }
- if (stitch_preview->preview_stitchable) {
- MEM_freeN(stitch_preview->preview_stitchable);
- stitch_preview->preview_stitchable = NULL;
- }
- if (stitch_preview->preview_unstitchable) {
- MEM_freeN(stitch_preview->preview_unstitchable);
- stitch_preview->preview_unstitchable = NULL;
- }
- if (stitch_preview->static_tris) {
- MEM_freeN(stitch_preview->static_tris);
- stitch_preview->static_tris = NULL;
- }
+ MEM_SAFE_FREE(stitch_preview->preview_polys);
+ MEM_SAFE_FREE(stitch_preview->uvs_per_polygon);
+ MEM_SAFE_FREE(stitch_preview->preview_stitchable);
+ MEM_SAFE_FREE(stitch_preview->preview_unstitchable);
+ MEM_SAFE_FREE(stitch_preview->static_tris);
MEM_freeN(stitch_preview);
}
}