aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-11-11 23:26:22 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-11-11 23:26:22 +0800
commitc9c6a8c33c566491795e014bea861c57fa6c4bd1 (patch)
treef826ba998a6acb90e6619078639e9fe48280557b
parent8b0ec780115a0e7f7694a72f912fb42f15d5dc6a (diff)
downloadgsoc2013-empathy-c9c6a8c33c566491795e014bea861c57fa6c4bd1.tar
gsoc2013-empathy-c9c6a8c33c566491795e014bea861c57fa6c4bd1.tar.gz
gsoc2013-empathy-c9c6a8c33c566491795e014bea861c57fa6c4bd1.tar.bz2
gsoc2013-empathy-c9c6a8c33c566491795e014bea861c57fa6c4bd1.tar.lz
gsoc2013-empathy-c9c6a8c33c566491795e014bea861c57fa6c4bd1.tar.xz
gsoc2013-empathy-c9c6a8c33c566491795e014bea861c57fa6c4bd1.tar.zst
gsoc2013-empathy-c9c6a8c33c566491795e014bea861c57fa6c4bd1.zip
Make empathy_pixbuf_scale_down_if_necessary treat 0 as "no limit"
svn path=/trunk/; revision=1681
-rw-r--r--libempathy-gtk/empathy-ui-utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index bf391ccc2..498dcc71e 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -500,7 +500,7 @@ empathy_pixbuf_scale_down_if_necessary (GdkPixbuf *pixbuf, gint max_size)
width = gdk_pixbuf_get_width (pixbuf);
height = gdk_pixbuf_get_height (pixbuf);
- if (width > max_size || height > max_size) {
+ if (width > 0 && (width > max_size || height > max_size)) {
factor = (gdouble) max_size / MAX (width, height);
width = width * factor;