diff -r e5da7785a265 -r 0aa32fc00dc2 pidgin/gtkconv.c --- a/pidgin/gtkconv.c Mon May 14 03:02:20 2012 +0000 +++ b/pidgin/gtkconv.c Thu May 31 03:45:21 2012 +0000 @@ -6132,10 +6132,13 @@ static gboolean get_iter_from_chatbuddy(PurpleConvChatBuddy *cb, GtkTreeIter *iter) { - GtkTreeRowReference *ref = cb->ui_data; + GtkTreeRowReference *ref; GtkTreePath *path; GtkTreeModel *model; + g_return_val_if_fail(cb != NULL, FALSE); + + ref = cb->ui_data; if (!ref) return FALSE; @@ -6315,6 +6318,9 @@ return; cbuddy = purple_conv_chat_cb_find(chat, user); + if (!cbuddy) + return; + if (get_iter_from_chatbuddy(cbuddy, &iter)) { GtkTreeRowReference *ref = cbuddy->ui_data; gtk_list_store_remove(GTK_LIST_STORE(model), &iter);