comparison libpurple/protocols/jabber/chat.c @ 28752:ef513141e960

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.
author Paul Aurich <paul@darkrain42.org>
date Thu, 15 Oct 2009 16:13:00 +0000
parents 63dc67b32577
children 08ffa726aea2
comparison
equal deleted inserted replaced
28749:5550823608cb 28752:ef513141e960
214 const char *password, GHashTable *data) 214 const char *password, GHashTable *data)
215 { 215 {
216 JabberChat *chat; 216 JabberChat *chat;
217 char *jid; 217 char *jid;
218 218
219 g_return_val_if_fail(jabber_chat_find(js, room, server) == NULL, NULL); 219 if (jabber_chat_find(js, room, server) != NULL)
220 return NULL;
220 221
221 chat = g_new0(JabberChat, 1); 222 chat = g_new0(JabberChat, 1);
222 chat->js = js; 223 chat->js = js;
223 224
224 chat->room = g_strdup(room); 225 chat->room = g_strdup(room);
262 int priority; 263 int priority;
263 264
264 char *jid; 265 char *jid;
265 266
266 chat = jabber_chat_new(js, room, server, handle, password, data); 267 chat = jabber_chat_new(js, room, server, handle, password, data);
267 g_return_val_if_fail(chat != NULL, NULL); 268 if (chat == NULL)
269 return NULL;
268 270
269 gc = js->gc; 271 gc = js->gc;
270 account = purple_connection_get_account(gc); 272 account = purple_connection_get_account(gc);
271 status = purple_account_get_active_status(account); 273 status = purple_account_get_active_status(account);
272 purple_status_to_jabber(status, &state, &msg, &priority); 274 purple_status_to_jabber(status, &state, &msg, &priority);