# HG changeset patch # User Waqas Hussain # Date 1307221063 -18000 # Node ID e3ffa91517ccc4fcdf9d32cc4533bcbf959694fc # Parent 73bf8aab8b77dc9ed017097c214053c0d691f241 util.xmppstream: Check to make sure parser.stop is present before calling it. diff -r 73bf8aab8b77 -r e3ffa91517cc util/xmppstream.lua --- a/util/xmppstream.lua Sun Jun 05 01:52:48 2011 +0500 +++ b/util/xmppstream.lua Sun Jun 05 01:57:43 2011 +0500 @@ -162,7 +162,7 @@ local function restricted_handler(parser) cb_error(session, "parse-error", "restricted-xml", "Restricted XML, see RFC 6120 section 11.1."); - if not parser:stop() then + if not parser.stop or not parser:stop() then error("Failed to abort parsing"); end end