diff options
Diffstat (limited to 'source/blender/blenkernel/intern/studiolight.c')
-rw-r--r-- | source/blender/blenkernel/intern/studiolight.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/studiolight.c b/source/blender/blenkernel/intern/studiolight.c index df48e505f6f..b64f6a1d076 100644 --- a/source/blender/blenkernel/intern/studiolight.c +++ b/source/blender/blenkernel/intern/studiolight.c @@ -129,12 +129,13 @@ static const char *STUDIOLIGHT_MATCAP_DEFAULT = "basic_1.exr"; static void studiolight_free(struct StudioLight *sl) { #define STUDIOLIGHT_DELETE_ICON(s) \ - { \ + do { \ if (s != 0) { \ BKE_icon_delete(s); \ s = 0; \ } \ - } + } while (0) + if (sl->free_function) { sl->free_function(sl, sl->free_function_data); } |