Fix T58360 "Use object as pivot" in GP "Shadow effect" crashes Blender

This commit is contained in:
Antonio Vazquez 2018-12-07 20:01:01 +01:00
parent 6a5e809697
commit a8e459e452
Notes: blender-bot 2023-02-14 04:50:49 +01:00
Referenced by issue #58360, Clicking "Use object as pivot" in GP "Shadow effect" crashes Blender
2 changed files with 5 additions and 0 deletions

View File

@ -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;
}

View File

@ -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)