Start looking at the GError parameter every time we call these functions:
commit4932272734f456d036f3b742f62cad11a1f99f2f
authorMark Doliner <markdoliner@pidgin.im>
Wed, 22 Jun 2011 07:07:28 +0000 (22 07:07 +0000)
committerMark Doliner <markdoliner@pidgin.im>
Wed, 22 Jun 2011 07:07:28 +0000 (22 07:07 +0000)
treefa50c39e76f8ce65041158d9672abdbe1d111654
parent3ad5c3a66cb5b293a60b85f5107aa646be1d9bb6
Start looking at the GError parameter every time we call these functions:
- gdk_pixbuf_loader_write
- gdk_pixbuf_loader_close
- gdk_pixbuf_new_from_file
- gdk_pixbuf_new_from_file_at_size
- gdk_pixbuf_new_from_file_at_scale

There are times when gdkpixbuf returns a semi-invalid GdkPixbuf object and
also sets the GError.  If this happens we want to discard and ignore the
GdkPixbuf object because it can cause problems.  For example, calling
gdk_pixbuf_scale_simple() causes gdkpixbuf to rapidly consume memory in
an infinite loop.  And that's bad.

This commit adds some helper functions to gtkutils.[c|h] that make it a
little easier to check the GError value.  We should use them everywhere
we call any of the above functions.

--HG--
extra : convert_revision : e802003adbf0be4496de3de8ac03b47c1e471d00
13 files changed:
pidgin/gtkaccount.c
pidgin/gtkblist.c
pidgin/gtkconv.c
pidgin/gtkdialogs.c
pidgin/gtkft.c
pidgin/gtkimhtml.c
pidgin/gtkmain.c
pidgin/gtkprefs.c
pidgin/gtkrequest.c
pidgin/gtksmiley.c
pidgin/gtkstatusbox.c
pidgin/gtkutils.c
pidgin/gtkutils.h