diff options
author | Florian Zeitz <florob@babelmonkeys.de> | 2013-06-12 16:53:51 +0200 |
---|---|---|
committer | Florian Zeitz <florob@babelmonkeys.de> | 2013-06-12 16:53:51 +0200 |
commit | 4262bfa1e703e992e93756f672c5f93bb8989144 (patch) | |
tree | bdf588bdd7214205177c7405eb9b48138ade9fb8 /util | |
parent | b1c09c14d2eb14fcf5dc0eabc1c2a9fd88ed2c5e (diff) | |
download | prosody-4262bfa1e703e992e93756f672c5f93bb8989144.tar.gz prosody-4262bfa1e703e992e93756f672c5f93bb8989144.zip |
util.pubsub: Check whether node exists, when deleting
Diffstat (limited to 'util')
-rw-r--r-- | util/pubsub.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/util/pubsub.lua b/util/pubsub.lua index 1ecbdfa8..e1418c62 100644 --- a/util/pubsub.lua +++ b/util/pubsub.lua @@ -233,6 +233,9 @@ function service:delete(node, actor) end -- local node_obj = self.nodes[node]; + if not node_obj then + return false, "item-not-found"; + end self.nodes[node] = nil; self.config.broadcaster("delete", node, node_obj.subscribers); return true; |