[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36895] trunk/blender/source/blender/imbuf /intern/scaling.c: fix [#27478] Crash on image editor after loading exr images
Campbell Barton
ideasman42 at gmail.com
Wed May 25 13:06:30 CEST 2011
Revision: 36895
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36895
Author: campbellbarton
Date: 2011-05-25 11:06:30 +0000 (Wed, 25 May 2011)
Log Message:
-----------
fix [#27478] Crash on image editor after loading exr images
patch from Ryakiotakis Antonis (psy-fi) with minor change.
Modified Paths:
--------------
trunk/blender/source/blender/imbuf/intern/scaling.c
Modified: trunk/blender/source/blender/imbuf/intern/scaling.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/scaling.c 2011-05-25 10:42:57 UTC (rev 36894)
+++ trunk/blender/source/blender/imbuf/intern/scaling.c 2011-05-25 11:06:30 UTC (rev 36895)
@@ -300,17 +300,18 @@
uchar *p1, *p2 = NULL, *dest;
float *p1f, *destf, *p2f = NULL;
int x,y;
- int do_rect, do_float;
+ const short do_rect= (ibuf1->rect != NULL);
+ const short do_float= (ibuf1->rect_float != NULL) && (ibuf2->rect_float != NULL);
- do_rect= (ibuf1->rect != NULL);
-
+ if(do_rect && (ibuf2->rect == NULL)) {
+ imb_addrectImBuf(ibuf2);
+ }
+
p1f = ibuf1->rect_float;
destf=ibuf2->rect_float;
p1 = (uchar *) ibuf1->rect;
dest=(uchar *) ibuf2->rect;
- do_float= (ibuf1->rect_float != NULL && ibuf2->rect_float != NULL);
-
for(y=ibuf2->y;y>0;y--){
if (do_rect) p2 = p1 + (ibuf1->x << 2);
if (do_float) p2f = p1f + (ibuf1->x << 2);
More information about the Bf-blender-cvs
mailing list