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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2007-10-17 22:33:01 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2007-10-17 22:33:01 +0400
commit2f515aaca1de9ed08f0173679375983333c43019 (patch)
treea4c955b67392986a2bfd3e858b4ff5bc4c89ffda /source/blender/src/imagepaint.c
parent2639404f34cd89e1eaebc3736d751938a801fcb9 (diff)
Fix for bug #7331
Texture painting could crash due to missing check for valid imbuf.
Diffstat (limited to 'source/blender/src/imagepaint.c')
-rw-r--r--source/blender/src/imagepaint.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/src/imagepaint.c b/source/blender/src/imagepaint.c
index 3809d731473..7b8efd0ed75 100644
--- a/source/blender/src/imagepaint.c
+++ b/source/blender/src/imagepaint.c
@@ -559,6 +559,9 @@ static int imapaint_paint_sub_stroke(ImagePaintState *s, BrushPainter *painter,
ImBuf *ibuf= BKE_image_get_ibuf(image, G.sima?&G.sima->iuser:NULL);
float pos[2];
+ if(!ibuf)
+ return 0;
+
pos[0] = uv[0]*ibuf->x;
pos[1] = uv[1]*ibuf->y;