Software /
code /
prosody
Changeset
1440:d3117a6ad1bf
mod_pep: Fixed a nil access error
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 28 Jun 2009 22:23:06 +0500 |
parents | 1439:f989608964ec |
children | 1441:9c6c7aa5dc60 |
files | plugins/mod_pep.lua |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_pep.lua Sun Jun 28 21:49:31 2009 +0500 +++ b/plugins/mod_pep.lua Sun Jun 28 22:23:06 2009 +0500 @@ -33,8 +33,10 @@ -- 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;