Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2020-11-11 13:31:33 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-11-11 14:16:22 +0300
commite47ea9fbc7c0c27843f2e934bafb3d36416c88ee (patch)
treea9f4277c864abd8c5d1f3c7f195a3af177cde4ae
parent7b6d76f3875916939b833057a9933de58d7936fa (diff)
GPencil: Fix unreported crash when style is NULL
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_cache_utils.c2
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;