diff options
author | Mark Doliner <markdoliner@pidgin.im> | 2011-06-22 07:09:42 +0000 |
---|---|---|
committer | Mark Doliner <markdoliner@pidgin.im> | 2011-06-22 07:09:42 +0000 |
commit | 21c4e17f9a3e032e52c8ccec552fb73fd9bbe0ce (patch) | |
tree | 81a3482cdc7962a1a74102b80863b36f19d5436a /pidgin/gtkmain.c | |
parent | de25d0e68933a3742195cbbf9fe6b2e73718f5c5 (diff) | |
download | pidgin-21c4e17f9a3e032e52c8ccec552fb73fd9bbe0ce.tar.gz |
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.
Diffstat (limited to 'pidgin/gtkmain.c')
-rw-r--r-- | pidgin/gtkmain.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pidgin/gtkmain.c b/pidgin/gtkmain.c index 24871a2c09..0fb2a7a393 100644 --- a/pidgin/gtkmain.c +++ b/pidgin/gtkmain.c @@ -270,7 +270,7 @@ ui_main(void) /* use the nice PNG icon for all the windows */ for(i=0; i<G_N_ELEMENTS(icon_sizes); i++) { icon_path = g_build_filename(DATADIR, "icons", "hicolor", icon_sizes[i].dir, "apps", icon_sizes[i].filename, NULL); - icon = gdk_pixbuf_new_from_file(icon_path, NULL); + icon = pidgin_pixbuf_new_from_file(icon_path); g_free(icon_path); if (icon) { icons = g_list_append(icons,icon); |