# HG changeset patch # User Florian Zeitz # Date 1371048831 -7200 # Node ID e29ece65e3b05b0cf8532de9a6eb46573909e1ee # Parent 9ca4d1ada906b5022e3f26c966c1ef69736f2706 util.pubsub: Check whether node exists, when deleting diff -r 9ca4d1ada906 -r e29ece65e3b0 util/pubsub.lua --- a/util/pubsub.lua Tue Jun 11 21:44:53 2013 +0100 +++ b/util/pubsub.lua Wed Jun 12 16:53:51 2013 +0200 @@ -233,6 +233,9 @@ 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;