# HG changeset patch # User Ed Swartz # Date 1283984022 18000 # Node ID 67581ab567b1239a7b7941ec3a2b7caf0f6132ac # Parent 0dd7f79ee65d06e267c11f87e02c4fdca0ecc75e Avoid NPEs when services (like TRK) go missing diff -r 0dd7f79ee65d -r 67581ab567b1 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 Wed Sep 08 17:12:10 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java Wed Sep 08 17:13:42 2010 -0500 @@ -211,8 +211,10 @@ public Collection getCompatibleConnectionTypeIds(IService service) { Collection compatibleConnectionTypeIds = new HashSet(); - for (IConnectedServiceFactory factory : connectedServiceFactories) { - compatibleConnectionTypeIds.addAll(factory.getCompatibleConnectionTypeIds(service)); + if (service != null) { + for (IConnectedServiceFactory factory : connectedServiceFactories) { + compatibleConnectionTypeIds.addAll(factory.getCompatibleConnectionTypeIds(service)); + } } return compatibleConnectionTypeIds; }