Mercurial > pidgin
diff src/gtkconv.c @ 10116:9f358a718f38
[gaim-migrate @ 11153]
I went through every commit email on oldstatus since we branched, and merged
relevant things to HEAD that had only been applied on oldstatus.
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Mon, 18 Oct 2004 19:02:33 +0000 |
parents | 4fd312ceaa29 |
children | d520ab74fe8f |
line wrap: on
line diff
--- a/src/gtkconv.c Mon Oct 18 17:25:25 2004 +0000 +++ b/src/gtkconv.c Mon Oct 18 19:02:33 2004 +0000 @@ -2311,10 +2311,18 @@ static GdkPixbuf * get_tab_icon(GaimConversation *conv, gboolean small_icon) { - GaimAccount *account = gaim_conversation_get_account(conv); - const char *name = gaim_conversation_get_name(conv); + GaimAccount *account = NULL; + const char *name = NULL; GdkPixbuf *status = NULL; + g_return_val_if_fail(conv != NULL, NULL); + + account = gaim_conversation_get_account(conv); + name = gaim_conversation_get_name(conv); + + g_return_val_if_fail(account != NULL, NULL); + g_return_val_if_fail(name != NULL, NULL); + if (gaim_conversation_get_type(conv) == GAIM_CONV_IM) { GaimBuddy *b = gaim_find_buddy(account, name); if (b != NULL) { @@ -2348,12 +2356,16 @@ const char *name; GdkPixbuf *status = NULL; + g_return_if_fail(conv != NULL); + gtkconv = GAIM_GTK_CONVERSATION(conv); name = gaim_conversation_get_name(conv); account = gaim_conversation_get_account(conv); status = get_tab_icon(conv, TRUE); + g_return_if_fail(status != NULL); + gtk_image_set_from_pixbuf(GTK_IMAGE(gtkconv->icon), status); gtk_image_set_from_pixbuf(GTK_IMAGE(gtkconv->menu_icon), status); @@ -5531,6 +5543,8 @@ GaimGtkChatPane *gtkchat; GaimConvChat *chat; + g_return_if_fail(conv != NULL); + win = gaim_conversation_get_window(conv); gtkwin = GAIM_GTK_WINDOW(win); gtkconv = GAIM_GTK_CONVERSATION(conv); @@ -5744,6 +5758,8 @@ if (gtkconv->u.im->iter != NULL) g_object_unref(G_OBJECT(gtkconv->u.im->iter)); + gtkconv->u.im->iter = NULL; + if (!gaim_prefs_get_bool("/gaim/gtk/conversations/im/show_buddy_icons")) return;