From a8e459e452f7b7c42de8c4719125b69bfd1c7f32 Mon Sep 17 00:00:00 2001 From: Antonioya Date: Fri, 7 Dec 2018 20:01:01 +0100 Subject: Fix T58360 "Use object as pivot" in GP "Shadow effect" crashes Blender --- source/blender/draw/engines/gpencil/gpencil_shader_fx.c | 3 +++ source/blender/shader_fx/intern/FX_shader_shadow.c | 2 ++ 2 files changed, 5 insertions(+) (limited to 'source/blender') diff --git a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c index fcadf296253..673b47ff052 100644 --- a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c +++ b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c @@ -443,6 +443,9 @@ static void DRW_gpencil_fx_shadow( } ShadowShaderFxData *fxd = (ShadowShaderFxData *)fx; if ((!fxd->object) && (fxd->flag & FX_SHADOW_USE_OBJECT)) { + fxd->runtime.fx_sh = NULL; + fxd->runtime.fx_sh_b = NULL; + fxd->runtime.fx_sh_c = NULL; return; } diff --git a/source/blender/shader_fx/intern/FX_shader_shadow.c b/source/blender/shader_fx/intern/FX_shader_shadow.c index e3a9543fcb4..ba1bd4fe907 100644 --- a/source/blender/shader_fx/intern/FX_shader_shadow.c +++ b/source/blender/shader_fx/intern/FX_shader_shadow.c @@ -61,6 +61,8 @@ static void initData(ShaderFxData *md) ARRAY_SET_ITEMS(gpfx->blur, 5, 5); gpfx->samples = 2; + + gpfx->object = NULL; } static void copyData(const ShaderFxData *md, ShaderFxData *target) -- cgit v1.2.3