summaryrefslogtreecommitdiff
path: root/gdk-pixbuf
diff options
context:
space:
mode:
authorMatthias Clasen <mclasne@redhat.com>2008-02-12 16:35:02 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2008-02-12 16:35:02 +0000
commit0eb4770cfa4d3e493bc352457870ac3dadb559d8 (patch)
treebdd16b9a61053b8fcef5175e2cfd6f987a98eeec /gdk-pixbuf
parent945db7f6a619f7bfaf9916eb2518a4c50477b484 (diff)
downloadgtk+-0eb4770cfa4d3e493bc352457870ac3dadb559d8.tar.gz
Don't let the width or height go below 1. (#516024, Christian Persch)
2008-02-12 Matthias Clasen <mclasne@redhat.com> * gdk-pixbuf-io.c (at_scale_size_prepared_cb): Don't let the width or height go below 1. (#516024, Christian Persch) svn path=/trunk/; revision=19534
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r--gdk-pixbuf/ChangeLog5
-rw-r--r--gdk-pixbuf/gdk-pixbuf-io.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog
index 2c45fec75f..7f978c423c 100644
--- a/gdk-pixbuf/ChangeLog
+++ b/gdk-pixbuf/ChangeLog
@@ -1,3 +1,8 @@
+2008-02-12 Matthias Clasen <mclasne@redhat.com>
+
+ * gdk-pixbuf-io.c (at_scale_size_prepared_cb): Don't let
+ the width or height go below 1. (#516024, Christian Persch)
+
2008-02-10 Matthias Clasen <mclasne@redhat.com>
* gdk-pixbuf-scaled-anim.c: Try harder to return pixbufs
diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
index 206ed7962c..30cffb37e2 100644
--- a/gdk-pixbuf/gdk-pixbuf-io.c
+++ b/gdk-pixbuf/gdk-pixbuf-io.c
@@ -1048,6 +1048,9 @@ at_scale_size_prepared_cb (GdkPixbufLoader *loader,
height = info->height;
}
+ width = MAX (width, 1);
+ height = MAX (height, 1);
+
gdk_pixbuf_loader_set_size (loader, width, height);
}