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:
authorCampbell Barton <ideasman42@gmail.com>2016-05-05 11:52:11 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-05-05 11:52:11 +0300
commit8c3c669c2d6f342bc27b0c8b130f8518f6b432f4 (patch)
tree6f1201515e55163aad48f0b5566b2b57e386416c /source/blender/editors/sculpt_paint/paint_image.c
parent08be000637b6610b59d3f2e47d666a64bd4fbb22 (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/paint_image.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c6
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);
+ }
}
}