diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-04-13 06:30:53 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-04-13 06:37:27 +0300 |
commit | 64660b902c3fb52fe5a3cb5bf232f90283db8732 (patch) | |
tree | c9549b247ca35e92c3f03db4f07d95aaede60e48 /source/blender/draw/modes/edit_text_mode.c | |
parent | c080702e73f1729897033343d44198488b6fed9f (diff) |
Use 'safe' macros for common free operation
Same as MEM_SAFE_FREE macro,
checks for NULL, runs free then sets NULL.
Blocks of code that do this many times are noisy and likely
errors here wouldn't be noticed immediately.
Also NULL's static vars which were being left set.
Diffstat (limited to 'source/blender/draw/modes/edit_text_mode.c')
-rw-r--r-- | source/blender/draw/modes/edit_text_mode.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/draw/modes/edit_text_mode.c b/source/blender/draw/modes/edit_text_mode.c index f105e2d316c..101202cea40 100644 --- a/source/blender/draw/modes/edit_text_mode.c +++ b/source/blender/draw/modes/edit_text_mode.c @@ -228,8 +228,7 @@ static void EDIT_TEXT_draw_scene(void *vedata) * Mostly used for freeing shaders */ static void EDIT_TEXT_engine_free(void) { - // if (custom_shader) - // DRW_shader_free(custom_shader); + // DRW_SHADER_FREE_SAFE(custom_shader); } /* Create collection settings here. |