From e80a522fcc0657545a8d5ba9ac13ba7f8f2c6703 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Tue, 26 Sep 2006 21:39:07 +0000 Subject: [PATCH] * Do not try to autocrop a canvas that has only spaces. --- src/filters.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/filters.c b/src/filters.c index 8cb99c9..15a9caa 100644 --- a/src/filters.c +++ b/src/filters.c @@ -51,6 +51,9 @@ void filter_autocrop(cucul_canvas_t *cv) } } + if(xmax < xmin || ymax < ymin) + return; + cucul_set_canvas_boundaries(cv, xmin, ymin, xmax - xmin + 1, ymax - ymin + 1); }