pidgin.2.x.y: e30e0449: *** Plucked rev d1d77da56217f3a083e1d459...

markdoliner at pidgin.im markdoliner at pidgin.im
Sat Feb 18 18:05:57 EST 2012


----------------------------------------------------------------------
Revision: e30e044988add329e86eaf06a2f6ab1b3c5c47bb
Parent:   8c802f21862e2c83621e4fcba09a8635119970ad
Author:   markdoliner at pidgin.im
Date:     02/18/12 18:00:10
Branch:   im.pidgin.pidgin.2.x.y
URL: http://d.pidgin.im/viewmtn/revision/info/e30e044988add329e86eaf06a2f6ab1b3c5c47bb

Changelog: 

*** Plucked rev d1d77da56217f3a083e1d459bef054db9f1d5699 (qulogic at pidgin.im):
Rearrange code to prevent a NULL-deference. Thanks to clh for
pointing out this issue.

Closes #14392.

Changes against parent 8c802f21862e2c83621e4fcba09a8635119970ad

  patched  pidgin/gtkconv.c

-------------- next part --------------
============================================================
--- pidgin/gtkconv.c	607a4f7e015c4d1ae18d0edfc018ec20df299037
+++ pidgin/gtkconv.c	e181e2fec1b0326a8b0e30a543538e74375b4777
@@ -6216,7 +6216,15 @@ pidgin_conv_chat_rename_user(PurpleConve
 	if (!gtk_tree_model_get_iter_first(GTK_TREE_MODEL(model), &iter))
 		return;
 
+	if ((tag = get_buddy_tag(conv, old_name, 0, FALSE)))
+		g_object_set(G_OBJECT(tag), "style", PANGO_STYLE_ITALIC, NULL);
+	if ((tag = get_buddy_tag(conv, old_name, PURPLE_MESSAGE_NICK, FALSE)))
+		g_object_set(G_OBJECT(tag), "style", PANGO_STYLE_ITALIC, NULL);
+
 	old_cbuddy = purple_conv_chat_cb_find(chat, old_name);
+	if (!old_cbuddy)
+		return;
+
 	if (get_iter_from_chatbuddy(old_cbuddy, &iter)) {
 		GtkTreeRowReference *ref = old_cbuddy->ui_data;
 
@@ -6225,14 +6233,6 @@ pidgin_conv_chat_rename_user(PurpleConve
 		old_cbuddy->ui_data = NULL;
 	}
 
-	if ((tag = get_buddy_tag(conv, old_name, 0, FALSE)))
-		g_object_set(G_OBJECT(tag), "style", PANGO_STYLE_ITALIC, NULL);
-	if ((tag = get_buddy_tag(conv, old_name, PURPLE_MESSAGE_NICK, FALSE)))
-		g_object_set(G_OBJECT(tag), "style", PANGO_STYLE_ITALIC, NULL);
-
-	if (!old_cbuddy)
-		return;
-
 	g_return_if_fail(new_alias != NULL);
 
 	new_cbuddy = purple_conv_chat_cb_find(chat, new_name);


More information about the Commits mailing list