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:
authorSergey Sharybin <sergey@blender.org>2021-08-27 16:07:26 +0300
committerSergey Sharybin <sergey@blender.org>2021-08-27 16:07:26 +0300
commit3f5e0f7d91e0e13870d98fe721a871e6be210489 (patch)
tree8cc19dfd648eb72be69e36c7673622eb4f78678b
parent57e8714b381c37cc5e934ad0a166e5de208f8828 (diff)
Fix crash sampling render result before any pixel was rendered
Caused by recent lazy render result passes allocation change.
-rw-r--r--source/blender/editors/space_image/image_draw.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index 4f66506d28b..d2af26aa1d7 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -389,10 +389,12 @@ void ED_image_draw_info(Scene *scene,
immRecti(pos, color_quater_x, color_quater_y, color_rect_half.xmax, color_rect_half.ymax);
immRecti(pos, color_rect_half.xmin, color_rect_half.ymin, color_quater_x, color_quater_y);
- GPU_blend(GPU_BLEND_ALPHA);
- immUniformColor3fvAlpha(finalcol, fp ? fp[3] : (cp[3] / 255.0f));
- immRecti(pos, color_rect.xmin, color_rect.ymin, color_rect.xmax, color_rect.ymax);
- GPU_blend(GPU_BLEND_NONE);
+ if (fp != NULL || cp != NULL) {
+ GPU_blend(GPU_BLEND_ALPHA);
+ immUniformColor3fvAlpha(finalcol, fp ? fp[3] : (cp[3] / 255.0f));
+ immRecti(pos, color_rect.xmin, color_rect.ymin, color_rect.xmax, color_rect.ymax);
+ GPU_blend(GPU_BLEND_NONE);
+ }
}
else {
immUniformColor3fv(finalcol);