aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/mod_component.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_component.lua b/plugins/mod_component.lua
index 96d55e40..5b1eefc7 100644
--- a/plugins/mod_component.lua
+++ b/plugins/mod_component.lua
@@ -149,7 +149,7 @@ function stream_callbacks.error(session, error, data, data2)
end
function stream_callbacks.streamopened(session, attr)
- if not hosts[attr.to].modules.component then
+ if not hosts[attr.to] or not hosts[attr.to].modules.component then
session:close{ condition = "host-unknown", text = tostring(attr.to).." does not match any configured external components" };
return;
end