[Bf-blender-cvs] [129c8fd684f] greasepencil-object: Fix error when render

Antonio Vazquez noreply at git.blender.org
Sun Jul 8 20:43:20 CEST 2018


Commit: 129c8fd684f17e716e7a1e7f72eea8d099aef007
Author: Antonio Vazquez
Date:   Sun Jul 8 20:43:09 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB129c8fd684f17e716e7a1e7f72eea8d099aef007

Fix error when render

The v3d pointer is null when renders, so need to be checked before use it.

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

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

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

diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index bba41a5a1af..48c4667fb47 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -1174,7 +1174,8 @@ void DRW_gpencil_populate_datablock(GPENCIL_e_data *e_data, void *vedata, Scene
 	int cfra_eval = (int)DEG_get_ctime(draw_ctx->depsgraph);
 	ToolSettings *ts = scene->toolsettings;
 	bGPDframe *derived_gpf = NULL;
-	const bool no_onion = (bool)(gpd->flag & GP_DATA_STROKE_WEIGHTMODE) || ((v3d->flag3 & V3D_GP_SHOW_ONION_SKIN) == 0);
+	const bool main_onion = v3d != NULL ? ((v3d->flag3 & V3D_GP_SHOW_ONION_SKIN) == 0) : true;
+	const bool no_onion = (bool)(gpd->flag & GP_DATA_STROKE_WEIGHTMODE) || main_onion;
 	const bool overlay = v3d != NULL ? (bool)((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) : true;
 
 	/* check if playing animation */



More information about the Bf-blender-cvs mailing list