aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2013-06-13 00:09:56 +0100
committerMatthew Wild <mwild1@gmail.com>2013-06-13 00:09:56 +0100
commit616c7ef5507e3005d41441df03f3096ed4f8216a (patch)
treeca1115da627fa591b3ed1aca2f6400935f6a8a5c /util
parent6008554b60d04336b81601196c08a90875bdf088 (diff)
parent1290bf766c700f939d9f63da1968b1e6357c75bf (diff)
downloadprosody-616c7ef5507e3005d41441df03f3096ed4f8216a.tar.gz
prosody-616c7ef5507e3005d41441df03f3096ed4f8216a.zip
Merge 0.9->trunk
Diffstat (limited to 'util')
-rw-r--r--util/pubsub.lua3
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;