diff options
author | Antonioya <blendergit@gmail.com> | 2018-12-07 22:01:01 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-12-07 22:01:01 +0300 |
commit | a8e459e452f7b7c42de8c4719125b69bfd1c7f32 (patch) | |
tree | e0af17c22ac9afd69b66c2491f7338e80700b0a9 /source/blender | |
parent | 6a5e8096973f701363a36eb07a096ff8ca784342 (diff) |
Fix T58360 "Use object as pivot" in GP "Shadow effect" crashes Blender
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/draw/engines/gpencil/gpencil_shader_fx.c | 3 | ||||
-rw-r--r-- | source/blender/shader_fx/intern/FX_shader_shadow.c | 2 |
2 files changed, 5 insertions, 0 deletions
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) |