[Rawstudio-dev] [PATCH] Fix crash when cropping

Edouard Gomez ed.gomez at free.fr
Wed Jan 3 20:39:43 CET 2007


# HG changeset patch
# User Edouard Gomez <ed.gomez at free.fr>
# Date 1167856731 -3600
# Node ID 4580b8c292eef1c9248d54eaf0b2515870235715
# Parent  4147f29ef9cf3384c11f2ba059efdaceadd5ea57
Fix crash when cropping

The width and height of the notroi preview image was miscalculated
though their width and height were already available... use previous
values and fix the crash eventually.

diff -r 4147f29ef9cf -r 4580b8c292ee src/rawstudio.c
--- a/src/rawstudio.c	Wed Jan 03 19:12:43 2007 +0000
+++ b/src/rawstudio.c	Wed Jan 03 21:38:51 2007 +0100
@@ -309,8 +309,7 @@ update_preview_region(RS_BLOB *rs, RS_RE
 			}
 			gdk_draw_rgb_image(rs->preview_backing_notroi, gc, /* not ROI */
 				region->x1, region->y1,
-				region->x2-region->x1+1,
-				region->y2-region->y1+1,
+				w, h,
 				GDK_RGB_DITHER_NONE, buffer, w * rs->photo->preview->pixelsize);
 			g_free(buffer);
 		}



More information about the Rawstudio-dev mailing list