diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-11-11 13:31:33 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-11-11 14:16:22 +0300 |
commit | e47ea9fbc7c0c27843f2e934bafb3d36416c88ee (patch) | |
tree | a9f4277c864abd8c5d1f3c7f195a3af177cde4ae /source/blender/draw/engines/gpencil/gpencil_cache_utils.c | |
parent | 7b6d76f3875916939b833057a9933de58d7936fa (diff) |
GPencil: Fix unreported crash when style is NULL
Diffstat (limited to 'source/blender/draw/engines/gpencil/gpencil_cache_utils.c')
-rw-r--r-- | source/blender/draw/engines/gpencil/gpencil_cache_utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c index 948255b3852..cdcfd569fff 100644 --- a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c +++ b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c @@ -62,7 +62,7 @@ GPENCIL_tObject *gpencil_object_cache_add(GPENCIL_PrivateData *pd, Object *ob) tgp_ob->do_mat_holdout = false; for (int i = 0; i < ob->totcol; i++) { MaterialGPencilStyle *gp_style = BKE_gpencil_material_settings(ob, i + 1); - if ((gp_style->flag & GP_MATERIAL_IS_STROKE_HOLDOUT) || + if ((gp_style != NULL) && (gp_style->flag & GP_MATERIAL_IS_STROKE_HOLDOUT) || ((gp_style->flag & GP_MATERIAL_IS_FILL_HOLDOUT))) { tgp_ob->do_mat_holdout = true; break; |