diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-11-11 23:26:22 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-11-11 23:26:22 +0800 |
commit | c9c6a8c33c566491795e014bea861c57fa6c4bd1 (patch) | |
tree | f826ba998a6acb90e6619078639e9fe48280557b | |
parent | 8b0ec780115a0e7f7694a72f912fb42f15d5dc6a (diff) | |
download | gsoc2013-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.c | 2 |
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; |