# HG changeset patch # User Richard Laager # Date 1226829986 0 # Node ID 245f3432a5ab9edbdb6f36e4b6c19f853e862cf6 # Parent 5f8fc6e7466a336b7608f97376b4612fab2297c8 Avoid trying to build a filename and pixbuf if there's no image filename. diff -r 5f8fc6e7466a -r 245f3432a5ab pidgin/gtkrequest.c --- a/pidgin/gtkrequest.c Sun Nov 16 08:44:14 2008 +0000 +++ b/pidgin/gtkrequest.c Sun Nov 16 10:06:26 2008 +0000 @@ -997,7 +997,6 @@ GtkTreeIter iter; GList *l; GList *icons = NULL; - GdkPixbuf* pixbuf; icons = purple_request_field_list_get_icons(field); @@ -1051,11 +1050,15 @@ if (icons) { const char *icon_path = (const char *)icons->data; - char* filename = g_build_filename(DATADIR, icon_path, NULL); + char* filename; + GdkPixbuf* pixbuf = NULL; - pixbuf = gdk_pixbuf_new_from_file(filename, NULL); - - g_free(filename); + if (icon_path) + { + filename = g_build_filename(DATADIR, icon_path, NULL); + pixbuf = gdk_pixbuf_new_from_file(filename, NULL); + g_free(filename); + } gtk_list_store_set(store, &iter, 0, purple_request_field_list_get_data(field, text),