[Bf-blender-cvs] [41afab82588] greasepencil-object: Cleanup: Use macro to free shaders

Antonio Vazquez noreply at git.blender.org
Thu Apr 13 15:34:36 CEST 2017


Commit: 41afab82588e1e4e346c210b2ec06e8edf6a985e
Author: Antonio Vazquez
Date:   Thu Apr 13 15:31:08 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rB41afab82588e1e4e346c210b2ec06e8edf6a985e

Cleanup: Use macro to free shaders

===================================================================

M	source/blender/draw/engines/gpencil/gpencil_mode.c

===================================================================

diff --git a/source/blender/draw/engines/gpencil/gpencil_mode.c b/source/blender/draw/engines/gpencil/gpencil_mode.c
index 41a5a283335..fbfbfc3fa30 100644
--- a/source/blender/draw/engines/gpencil/gpencil_mode.c
+++ b/source/blender/draw/engines/gpencil/gpencil_mode.c
@@ -127,10 +127,8 @@ static void GPENCIL_engine_init(void *vedata)
 
 static void GPENCIL_engine_free(void)
 {
-	if (e_data.gpencil_fill_sh)
-		DRW_shader_free(e_data.gpencil_fill_sh);
-	if (e_data.gpencil_stroke_sh)
-		DRW_shader_free(e_data.gpencil_stroke_sh);
+	DRW_SHADER_FREE_SAFE(e_data.gpencil_fill_sh);
+	DRW_SHADER_FREE_SAFE(e_data.gpencil_stroke_sh);
 }
 
 /* create shading group for filling */




More information about the Bf-blender-cvs mailing list