From 41ed6b280fc1a2e97f50c85aba82fd33c00b7e6c Mon Sep 17 00:00:00 2001 From: Manish Singh Date: Sat, 13 Aug 2005 23:55:52 +0000 Subject: [PATCH] if the offsets of the layer are such that they are just on the border of 2005-08-13 Manish Singh * app/core/gimpimage-preview.c (gimp_image_get_new_preview): if the offsets of the layer are such that they are just on the border of the image, detect that and bail instead of trying to make a sub-preview with a 0 dimension. --- ChangeLog | 7 +++++++ app/core/gimpimage-preview.c | 3 +++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0c530c0b72..27b11e353e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-08-13 Manish Singh + + * app/core/gimpimage-preview.c (gimp_image_get_new_preview): if the + offsets of the layer are such that they are just on the border of + the image, detect that and bail instead of trying to make a + sub-preview with a 0 dimension. + 2005-08-14 Michael Natterer * plug-ins/common/gauss.c diff --git a/app/core/gimpimage-preview.c b/app/core/gimpimage-preview.c index efcea55675..979360ec9f 100644 --- a/app/core/gimpimage-preview.c +++ b/app/core/gimpimage-preview.c @@ -261,6 +261,9 @@ gimp_image_get_new_preview (GimpViewable *viewable, x2 = CLAMP (x + w, 0, width); y2 = CLAMP (y + h, 0, height); + if (x2 == x1 || y2 == y1) + continue; + src1PR.bytes = comp->bytes; src1PR.x = x1; src1PR.y = y1;