changeset 7482:9b69fdd148fc

[gaim-migrate @ 8095] don't segfault when aliasing the first copy of a jabber buddy in your buddy list committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Wed, 12 Nov 2003 01:22:45 +0000
parents 5f0f9d7fba6a
children 4a416ff9cb4f
files src/protocols/jabber/roster.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/jabber/roster.c	Tue Nov 11 22:22:31 2003 +0000
+++ b/src/protocols/jabber/roster.c	Wed Nov 12 01:22:45 2003 +0000
@@ -275,8 +275,11 @@
 void jabber_roster_alias_change(GaimConnection *gc, const char *name, const char *alias)
 {
 	GaimBuddy *b = gaim_find_buddy(gc->account, name);
+	char *a;
 
-	gaim_blist_alias_buddy(b, alias);
+	a = g_strdup(alias);
+	gaim_blist_alias_buddy(b, a);
+	g_free(a);
 
 	jabber_roster_update(gc->proto_data, name, NULL);
 }