aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/moduleapi.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua
index c1d8851e..8790a9d3 100644
--- a/core/moduleapi.lua
+++ b/core/moduleapi.lua
@@ -645,7 +645,7 @@ function api:may(action, context)
end
local session = context.origin or context.session;
- if not session then
+ if type(session) ~= "table" then
error("Unable to identify actor session from context");
end
if session.type == "s2sin" or (session.type == "c2s" and session.host ~= self.host) then