changeset 25682:bdc09d3164df

Fix assertion.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Sat, 07 Jun 2008 19:57:32 +0000
parents 6268758d029a
children ee028c73d3e2
files libpurple/protocols/jabber/jingle.c
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jingle.c	Sat Jun 07 03:43:45 2008 +0000
+++ b/libpurple/protocols/jabber/jingle.c	Sat Jun 07 19:57:32 2008 +0000
@@ -266,11 +266,10 @@
 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 *