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/screen/area.c
parent99738fbfdc8b4639d95c796bcc8711bd89c1aaa4 (diff)
Cleanup: use MEM_SAFE_FREE macro
Diffstat (limited to 'source/blender/editors/screen/area.c')
-rw-r--r--source/blender/editors/screen/area.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index c351ade9954..e08a4e946f6 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -834,9 +834,8 @@ void ED_area_status_text(ScrArea *area, const char *str)
BLI_strncpy(region->headerstr, str, UI_MAX_DRAW_STR);
BLI_str_rstrip(region->headerstr);
}
- else if (region->headerstr) {
- MEM_freeN(region->headerstr);
- region->headerstr = NULL;
+ else {
+ MEM_SAFE_FREE(region->headerstr);
}
ED_region_tag_redraw(region);
}
@@ -859,9 +858,8 @@ void ED_workspace_status_text(bContext *C, const char *str)
}
BLI_strncpy(workspace->status_text, str, UI_MAX_DRAW_STR);
}
- else if (workspace->status_text) {
- MEM_freeN(workspace->status_text);
- workspace->status_text = NULL;
+ else {
+ MEM_SAFE_FREE(workspace->status_text);
}
/* Redraw status bar. */