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-08-06 04:51:17 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2007-08-06 04:51:17 +0400
commitb3655aeac60c672412e179fc436cc95bef429c66 (patch)
treefe2d5db52326c73e47da299cdb381fd654face13 /source/blender/src/drawimage.c
parent2b9f61a8da3b430df781f1cb895a36b9ea51726a (diff)
Fix for bug #6977:
Drawing float images with the tiles option crashed.
Diffstat (limited to 'source/blender/src/drawimage.c')
-rw-r--r--source/blender/src/drawimage.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/src/drawimage.c b/source/blender/src/drawimage.c
index dbf9f6fd8be..e1e9f7a8595 100644
--- a/source/blender/src/drawimage.c
+++ b/source/blender/src/drawimage.c
@@ -1641,6 +1641,10 @@ void drawimagespace(ScrArea *sa, void *spacedata)
glPixelZoom((float)sima->zoom, (float)sima->zoom);
if(sima->flag & SI_EDITTILE) {
+ /* create char buffer from float if needed */
+ if(ibuf->rect_float && ibuf->rect==NULL)
+ IMB_rect_from_float(ibuf);
+
glaDrawPixelsSafe(x1, y1, ibuf->x, ibuf->y, ibuf->x, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect);
glPixelZoom(1.0, 1.0);
@@ -1681,6 +1685,10 @@ void drawimagespace(ScrArea *sa, void *spacedata)
sx*= dx;
sy*= dy;
+ /* create char buffer from float if needed */
+ if(ibuf->rect_float && ibuf->rect==NULL)
+ IMB_rect_from_float(ibuf);
+
rect= get_part_from_ibuf(ibuf, sx, sy, sx+dx, sy+dy);
/* rect= ibuf->rect; */