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
commitd01914e9a8ddaa608f637dddd4e85b49979bd302 (patch)
treeca1115da627fa591b3ed1aca2f6400935f6a8a5c /util
parentcd86257eabfdc059157650558900a616308a8a24 (diff)
parent442955c94c7fa4ed6c26eb159676e74a7bed98ba (diff)
downloadprosody-d01914e9a8ddaa608f637dddd4e85b49979bd302.tar.gz
prosody-d01914e9a8ddaa608f637dddd4e85b49979bd302.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;