From 1b16ced4148e803f9ab9a8353fa80617fabef37b Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo Date: Tue, 25 Nov 2008 10:30:29 -0200 Subject: [PATCH] If IQ does not have a namespace, ignore it --- hook.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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")) -- 2.20.1