applied changes from 8300e1e9a38c8d28e0710569d22be71f6c1abca9
commit901d11083d8aa72de8f3bfb113d292fd0220cad5
authorMark Doliner <markdoliner@pidgin.im>
Wed, 22 Jun 2011 07:09:42 +0000 (22 07:09 +0000)
committerMark Doliner <markdoliner@pidgin.im>
Wed, 22 Jun 2011 07:09:42 +0000 (22 07:09 +0000)
tree81a3482cdc7962a1a74102b80863b36f19d5436a
parent688218ba146ceb118097014110607443caa815a5
applied changes from 8300e1e9a38c8d28e0710569d22be71f6c1abca9
             through 96183796df0c52bb91e9828948c24cfa36845c1d

Original commit message:
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--
branch : release-2.9.0
extra : convert_revision : 1b3d9b3df8497b2273716e872abfc59b48a567d4
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