aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/stanza_router.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua
index 68a71d3b..0ce5dd69 100644
--- a/core/stanza_router.lua
+++ b/core/stanza_router.lua
@@ -81,7 +81,7 @@ function core_process_stanza(origin, stanza)
component_handle_stanza(origin, stanza);
elseif hosts[to] and hosts[to].type == "component" then -- hack to allow components to handle node@server/resource and server/resource
component_handle_stanza(origin, stanza);
- elseif hosts[host].type == "component" then -- directed at a component
+ elseif hosts[host] and hosts[host].type == "component" then -- directed at a component
component_handle_stanza(origin, stanza);
elseif origin.type == "c2s" and stanza.name == "presence" and stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" then
handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare);