qulogic/pidgin

0aa32fc00dc2
Fix crash when ignoring message from a user not in the room. Fixes #15139

Occurs with IRC system messages on-login.
--- a/ChangeLog Mon May 14 03:02:20 2012 +0000
+++ b/ChangeLog Thu May 31 03:45:21 2012 +0000
@@ -1,7 +1,9 @@
Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul
version 2.10.5:
- No changes
+ Pidgin:
+ * Fix a crash that may occur when trying to ignore a user who is
+ not in the current chat room. (#15139)
version 2.10.4 (05/06/2012):
General:
--- 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);