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:
Diffstat (limited to 'source/blender/draw/engines')
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_cache_utils.c2
-rw-r--r--source/blender/draw/engines/overlay/overlay_image.c4
2 files changed, 3 insertions, 3 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..f2472699300 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;
diff --git a/source/blender/draw/engines/overlay/overlay_image.c b/source/blender/draw/engines/overlay/overlay_image.c
index 9695f8616a5..844a0eb8351 100644
--- a/source/blender/draw/engines/overlay/overlay_image.c
+++ b/source/blender/draw/engines/overlay/overlay_image.c
@@ -346,9 +346,9 @@ void OVERLAY_image_camera_cache_populate(OVERLAY_Data *vedata, Object *ob)
mul_m4_m4m4(mat, modelmat, mat);
const bool is_foreground = (bgpic->flag & CAM_BGIMG_FLAG_FOREGROUND) != 0;
- /* Alpha is clamped just below 1.0 to fix background images to intefere with foreground
+ /* Alpha is clamped just below 1.0 to fix background images to interfere with foreground
* images. Without this a background image with 1.0 will be rendered on top of a transparent
- * foreground image due to the differnet blending modes they use. */
+ * foreground image due to the different blending modes they use. */
const float color_premult_alpha[4] = {1.0f, 1.0f, 1.0f, MIN2(bgpic->alpha, 0.999999)};
DRWPass *pass = is_foreground ? (use_view_transform ? psl->image_foreground_scene_ps :