From 1a093754e137632e760e438d87bac6f41f41cc62 Mon Sep 17 00:00:00 2001 From: Gaston Dombiak Date: Tue, 10 Aug 2004 13:03:15 +0000 Subject: [PATCH] Fixes NPE when sending null as the node while trying to get the NodeInformationProvider for a node. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2364 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smackx/ServiceDiscoveryManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/org/jivesoftware/smackx/ServiceDiscoveryManager.java b/source/org/jivesoftware/smackx/ServiceDiscoveryManager.java index ea2f8f4d6..acffd409f 100644 --- a/source/org/jivesoftware/smackx/ServiceDiscoveryManager.java +++ b/source/org/jivesoftware/smackx/ServiceDiscoveryManager.java @@ -248,6 +248,9 @@ public class ServiceDiscoveryManager { * to a given node. */ private NodeInformationProvider getNodeInformationProvider(String node) { + if (node == null) { + return null; + } return (NodeInformationProvider) nodeInformationProviders.get(node); }