From 2249117f21b5a34cd8aaab0c55939fa0224e53a1 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Sun, 28 Jun 2009 22:23:06 +0500 Subject: mod_pep: Fixed a nil access error --- plugins/mod_pep.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins/mod_pep.lua') diff --git a/plugins/mod_pep.lua b/plugins/mod_pep.lua index 78098423..4a8300f1 100644 --- a/plugins/mod_pep.lua +++ b/plugins/mod_pep.lua @@ -33,8 +33,10 @@ local function publish(session, node, item) -- store for the future local user_data = data[bare]; if disable then - if user_data then user_data[node] = nil; end - if not next(user_data) then data[bare] = nil; end + if user_data then + user_data[node] = nil; + if not next(user_data) then data[bare] = nil; end + end else if not user_data then user_data = {}; data[bare] = user_data; end user_data[node] = stanza; -- cgit v1.2.3