[Bug 9514] Fix NPE
authordadubrow
Wed, 29 Jul 2009 13:45:03 -0500
changeset 382 6a8fd4465a9b
parent 381 9a15cc2691b5
child 385 79d3b00c9f45
[Bug 9514] Fix NPE
connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java	Tue Jul 28 15:08:51 2009 -0500
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java	Wed Jul 29 13:45:03 2009 -0500
@@ -407,7 +407,11 @@
 	}
 	
 	public Collection<IConnectedService> getConnectedServices(IConnection connection) {
-		return new ArrayList<IConnectedService>(connectionToConnectedServices.get(connection));
+		List<IConnectedService> connectedServices = connectionToConnectedServices.get(connection);
+		if (connectedServices != null)
+			return new ArrayList<IConnectedService>(connectedServices);
+		
+		return null;
 	}
 
 	private File getConnectionStorageFile() {