soc.2008.vv: ebdf5b47: Fix assertion.

maiku at soc.pidgin.im maiku at soc.pidgin.im
Sat Jun 7 16:20:57 EDT 2008


-----------------------------------------------------------------
Revision: ebdf5b47d519505babea6d71794f2b59c4db8173
Ancestor: 8ec50f93625e0ff6d5743d26f40cb0214d6ce1ec
Author: maiku at soc.pidgin.im
Date: 2008-06-07T19:57:32
Branch: im.pidgin.soc.2008.vv
URL: http://d.pidgin.im/viewmtn/revision/info/ebdf5b47d519505babea6d71794f2b59c4db8173

Modified files:
        libpurple/protocols/jabber/jingle.c

ChangeLog: 

Fix assertion.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jingle.c	df417a340f77d8782d886c2a9180e1000937c7db
+++ libpurple/protocols/jabber/jingle.c	02929ba31cf30d6d9e2ef3b8bafdf2ba95379ec3
@@ -266,11 +266,10 @@ jabber_jingle_session_find_by_id(JabberS
 jabber_jingle_session_find_by_id(JabberStream *js, const char *id)
 {
 	purple_debug_info("jingle", "find_by_id %s\n", id);
-	purple_debug_info("jingle", "hash table: %p\n", js->sessions);
-	purple_debug_info("jingle", "hash table size %d\n",
-					  g_hash_table_size(js->sessions));
-	purple_debug_info("jingle", "lookup: %p\n", g_hash_table_lookup(js->sessions, id));  
-	return (JingleSession *) g_hash_table_lookup(js->sessions, id);
+	purple_debug_info("jingle", "lookup: %p\n", (js->sessions) ?
+			  g_hash_table_lookup(js->sessions, id) : NULL);  
+	return (JingleSession *) (js->sessions) ?
+			  g_hash_table_lookup(js->sessions, id) : NULL;
 }
 
 static JingleSession *


More information about the Commits mailing list