pidgin: 0ff7fb50: jabber: Reduce these from assertions to ...
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Thu Oct 15 12:16:12 EDT 2009
-----------------------------------------------------------------
Revision: 0ff7fb50305f33b84a373ff00a085c25175515c1
Ancestor: 1bcd0bb175fd417fd165aa7b52e219c97b0e30c6
Author: darkrain42 at pidgin.im
Date: 2009-10-15T16:13:00
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/0ff7fb50305f33b84a373ff00a085c25175515c1
Modified files:
libpurple/protocols/jabber/chat.c
ChangeLog:
jabber: Reduce these from assertions to checks.
Both of those are triggered by double-clicking on an already-open chat in
the buddy list, so they shouldn't be assertions.
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/chat.c fb44ee14ab62af879cbb3e64475a5af13ad821ef
+++ libpurple/protocols/jabber/chat.c af3f1e26f0c632a65beff430f742808ff6b03172
@@ -216,7 +216,8 @@ static JabberChat *jabber_chat_new(Jabbe
JabberChat *chat;
char *jid;
- g_return_val_if_fail(jabber_chat_find(js, room, server) == NULL, NULL);
+ if (jabber_chat_find(js, room, server) != NULL)
+ return NULL;
chat = g_new0(JabberChat, 1);
chat->js = js;
@@ -264,7 +265,8 @@ JabberChat *jabber_join_chat(JabberStrea
char *jid;
chat = jabber_chat_new(js, room, server, handle, password, data);
- g_return_val_if_fail(chat != NULL, NULL);
+ if (chat == NULL)
+ return NULL;
gc = js->gc;
account = purple_connection_get_account(gc);
More information about the Commits
mailing list