aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-06-28 22:23:06 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-06-28 22:23:06 +0500
commit2249117f21b5a34cd8aaab0c55939fa0224e53a1 (patch)
tree219b24019767bae19a9529b883842fa6f53804ed /plugins
parent1192a5719e5805cf65245323c3436568e6e8ff74 (diff)
downloadprosody-2249117f21b5a34cd8aaab0c55939fa0224e53a1.tar.gz
prosody-2249117f21b5a34cd8aaab0c55939fa0224e53a1.zip
mod_pep: Fixed a nil access error
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_pep.lua6
1 files changed, 4 insertions, 2 deletions
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;