From: Waqas Hussain Date: Sun, 28 Jun 2009 17:23:06 +0000 (+0500) Subject: mod_pep: Fixed a nil access error X-Git-Url: https://git.enpas.org/?a=commitdiff_plain;ds=sidebyside;h=ee9546db04f34dc740b5b2b74ac269918ab9de9f;p=prosody.git mod_pep: Fixed a nil access error --- 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;