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/editors/sculpt_paint/paint_image_2d.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_2d.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c
index 8db1b1817b5..ed1b25d1b4e 100644
--- a/source/blender/editors/sculpt_paint/paint_image_2d.c
+++ b/source/blender/editors/sculpt_paint/paint_image_2d.c
@@ -704,7 +704,7 @@ int paint_2d_stroke(void *ps, const int prev_mval[2], const int mval[2], int era
ImagePaintState *s = ps;
BrushPainter *painter = s->painter;
ImBuf *ibuf = BKE_image_acquire_ibuf(s->image, s->sima ? &s->sima->iuser : NULL, NULL);
- int is_data = ibuf->colormanage_flag & IMB_COLORMANAGE_IS_DATA;
+ const bool is_data = (ibuf && ibuf->colormanage_flag & IMB_COLORMANAGE_IS_DATA);
if (!ibuf)
return 0;
@@ -739,7 +739,7 @@ int paint_2d_stroke(void *ps, const int prev_mval[2], const int mval[2], int era
brush_painter_2d_require_imbuf(painter, ((ibuf->rect_float) ? 1 : 0), 0, 0);
if (painter->cache.enabled)
- brush_painter_2d_refresh_cache(painter, newuv, is_data == FALSE);
+ brush_painter_2d_refresh_cache(painter, newuv, is_data == false);
if (paint_2d_op(s, painter->cache.ibuf, olduv, newuv)) {
imapaint_image_update(s->sima, s->image, ibuf, false);