# HG changeset patch # User Mark Doliner # Date 1155711746 0 # Node ID 11394a70de3756dbf5e203b30ee514cec25a0c4a # Parent 89d043d547cc74093c98c9867bf228374f9bcb2e [gaim-migrate @ 16785] Fix some assertion failures committer: Tailor Script diff -r 89d043d547cc -r 11394a70de37 src/gtkstatusbox.c --- a/src/gtkstatusbox.c Wed Aug 16 06:58:59 2006 +0000 +++ b/src/gtkstatusbox.c Wed Aug 16 07:02:26 2006 +0000 @@ -1179,7 +1179,9 @@ icon_alc.x = allocation->width - icon_alc.width; icon_alc.y += 3; - if (status_box->icon_size != icon_alc.height) { + if ((status_box->buddy_icon_path != NULL) && + (status_box->icon_size != icon_alc.height)) + { scaled = gdk_pixbuf_new_from_file_at_scale(status_box->buddy_icon_path, icon_alc.height, icon_alc.width, FALSE, NULL); status_box->buddy_icon_hover = gdk_pixbuf_copy(scaled); @@ -1335,13 +1337,16 @@ g_free(box->buddy_icon_path); box->buddy_icon_path = g_strdup(filename); - scaled = gdk_pixbuf_new_from_file_at_scale(filename, - box->icon_size, box->icon_size, FALSE, NULL); - box->buddy_icon_hover = gdk_pixbuf_copy(scaled); - do_colorshift(box->buddy_icon_hover, box->buddy_icon_hover, 30); - g_object_unref(box->buddy_icon); - box->buddy_icon = scaled; - gtk_image_set_from_pixbuf(GTK_IMAGE(box->icon), box->buddy_icon); + if (filename != NULL) + { + scaled = gdk_pixbuf_new_from_file_at_scale(filename, + box->icon_size, box->icon_size, FALSE, NULL); + box->buddy_icon_hover = gdk_pixbuf_copy(scaled); + do_colorshift(box->buddy_icon_hover, box->buddy_icon_hover, 30); + g_object_unref(box->buddy_icon); + box->buddy_icon = scaled; + gtk_image_set_from_pixbuf(GTK_IMAGE(box->icon), box->buddy_icon); + } gaim_prefs_set_string("/gaim/gtk/accounts/buddyicon", filename); } diff -r 89d043d547cc -r 11394a70de37 src/prefs.c --- a/src/prefs.c Wed Aug 16 06:58:59 2006 +0000 +++ b/src/prefs.c Wed Aug 16 07:02:26 2006 +0000 @@ -124,14 +124,14 @@ } else if (pref->type == GAIM_PREF_STRING) { xmlnode_set_attrib(node, "type", "string"); - xmlnode_set_attrib(node, "value", pref->value.string); + xmlnode_set_attrib(node, "value", pref->value.string ? pref->value.string : ""); } else if (pref->type == GAIM_PREF_STRING_LIST) { xmlnode_set_attrib(node, "type", "stringlist"); for (cur = pref->value.stringlist; cur != NULL; cur = cur->next) { childnode = xmlnode_new_child(node, "item"); - xmlnode_set_attrib(childnode, "value", cur->data); + xmlnode_set_attrib(childnode, "value", cur->data ? cur->data : ""); } } else if (pref->type == GAIM_PREF_BOOLEAN) {