From: Thadeu Lima de Souza Cascardo Date: Tue, 25 Nov 2008 12:30:29 +0000 (-0200) Subject: If IQ does not have a namespace, ignore it X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fchat.git;a=commitdiff_plain;h=1b16ced4148e803f9ab9a8353fa80617fabef37b If IQ does not have a namespace, ignore it --- diff --git a/hook.c b/hook.c index 41ef3c5..7b95869 100644 --- a/hook.c +++ b/hook.c @@ -66,8 +66,8 @@ hc_xmpp_hook (void *data, int type, iks *stanza) { char *ns = iks_find_attrib (iks_child (stanza), "xmlns"); hc_xmpp_hook_t hook; - if (g_hash_table_lookup_extended (xmpp->nshooks, ns, - NULL, (gpointer *) &hook)) + if (ns != NULL && g_hash_table_lookup_extended (xmpp->nshooks, ns, + NULL, (gpointer *) &hook)) hook (xmpp, stanza); } else if (!iks_strcmp (iks_name (stanza), "stream:features"))