From 57683f24cf25eb604c3a585c1fe46bd3065a31e7 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Sun, 5 Jun 2011 01:57:43 +0500 Subject: util.xmppstream: Check to make sure parser.stop is present before calling it. --- util/xmppstream.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/xmppstream.lua') diff --git a/util/xmppstream.lua b/util/xmppstream.lua index 69e7690d..ac4d77af 100644 --- a/util/xmppstream.lua +++ b/util/xmppstream.lua @@ -162,7 +162,7 @@ function new_sax_handlers(session, stream_callbacks) 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 -- cgit v1.2.3