diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-05-05 11:52:11 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-05-05 11:52:11 +0300 |
commit | 8c3c669c2d6f342bc27b0c8b130f8518f6b432f4 (patch) | |
tree | 6f1201515e55163aad48f0b5566b2b57e386416c /source/blender/editors/sculpt_paint | |
parent | 08be000637b6610b59d3f2e47d666a64bd4fbb22 (diff) |
Image Paint: fix for calls to GPU_free_image while painting
The width and height of of the region to update are often zero,
skip calling GPU_paint_update_image in this case.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index a9cd601c9b0..4dd521e53ef 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -498,8 +498,10 @@ void imapaint_image_update(SpaceImage *sima, Image *image, ImBuf *ibuf, short te if (texpaint || (sima && sima->lock)) { int w = imapaintpartial.x2 - imapaintpartial.x1; int h = imapaintpartial.y2 - imapaintpartial.y1; - /* Testing with partial update in uv editor too */ - GPU_paint_update_image(image, (sima ? &sima->iuser : NULL), imapaintpartial.x1, imapaintpartial.y1, w, h); //!texpaint); + if (w && h) { + /* Testing with partial update in uv editor too */ + GPU_paint_update_image(image, (sima ? &sima->iuser : NULL), imapaintpartial.x1, imapaintpartial.y1, w, h); + } } } |