plugins/mod_component.lua
changeset 4655 9159546cb2f3
parent 4650 464ca74ddf6a
child 4734 4d43dbd6de17
--- a/plugins/mod_component.lua	Sun Apr 22 14:54:36 2012 +0100
+++ b/plugins/mod_component.lua	Sun Apr 22 16:35:26 2012 +0100
@@ -149,7 +149,7 @@
 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