aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/error.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/error.lua b/util/error.lua
index da6d938c..64c742ae 100644
--- a/util/error.lua
+++ b/util/error.lua
@@ -141,7 +141,7 @@ local function from_stanza(stanza, context, source)
local error_tag = stanza:get_child("error");
context = context or {};
context.stanza = stanza;
- context.by = error_tag.attr.by or stanza.attr.from;
+ context.by = error_tag and error_tag.attr.by or stanza.attr.from;
local uri;
if condition == "gone" or condition == "redirect" then