aboutsummaryrefslogtreecommitdiffstats
path: root/core/xmlhandlers.lua
diff options
context:
space:
mode:
Diffstat (limited to 'core/xmlhandlers.lua')
-rw-r--r--core/xmlhandlers.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/xmlhandlers.lua b/core/xmlhandlers.lua
index 182da894..c587548a 100644
--- a/core/xmlhandlers.lua
+++ b/core/xmlhandlers.lua
@@ -114,7 +114,8 @@ function init_xmlhandlers(session, stream_callbacks)
chardata = {};
end
-- Complete stanza
- if #stanza.last_add == 0 then
+ local last_add = stanza.last_add;
+ if not last_add or #last_add == 0 then
if tagname ~= stream_error_tag then
cb_handlestanza(session, stanza);
else