From 154c98ed65d90dd1f3cb7e68cbe3c95aea5b2dd3 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 18 Nov 2012 22:02:54 +0000 Subject: [PATCH] Fixed error when not nick name change presence --- src/room_chat.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/room_chat.c b/src/room_chat.c index 22a3d555..c735c75f 100644 --- a/src/room_chat.c +++ b/src/room_chat.c @@ -250,11 +250,10 @@ room_complete_pending_nick_change(const char * const room, muc_room *chat_room = g_hash_table_lookup(rooms, room); if (chat_room != NULL) { - char *old_nick = - strdup(g_hash_table_lookup(chat_room->nick_changes, nick)); + char *old_nick = g_hash_table_lookup(chat_room->nick_changes, nick); if (old_nick != NULL) { - return old_nick; + return strdup(old_nick); } }