[gthumb] cairo scale: fixed error if the size is zero
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] cairo scale: fixed error if the size is zero
- Date: Sat, 9 Nov 2013 20:09:31 +0000 (UTC)
commit 5e72134a962cd1e9edce7513b632de1988c5b154
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Nov 3 18:20:34 2013 +0100
cairo scale: fixed error if the size is zero
gthumb/cairo-scale.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gthumb/cairo-scale.c b/gthumb/cairo-scale.c
index 28c482d..de90637 100644
--- a/gthumb/cairo-scale.c
+++ b/gthumb/cairo-scale.c
@@ -885,6 +885,9 @@ _cairo_image_surface_scale_bilinear (cairo_surface_t *image,
cairo_surface_t *tmp2;
double w, h;
+ if ((new_width == 0) || (new_height == 0))
+ return NULL;
+
scale = (double) new_width / cairo_image_surface_get_width (image);
last_scale = 1.0;
s = scale;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]