1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

Add check to prevent possible NPE

Change-Id: I5e653f8e32484f6bcda5d13f78b1b3c712cf888c
Signed-off-by: Greg Watson <g.watson@computer.org>
This commit is contained in:
Greg Watson 2014-09-24 09:15:44 -04:00
parent 1296420f07
commit b3dbbaca76

View file

@ -123,9 +123,15 @@ public class RemoteServicesUtils {
conn = services.getConnectionManager().getConnection(connName);
} else if (connName != null) {
for (RemoteServicesDescriptor proxy : RemoteServicesImpl.getRemoteServiceDescriptors()) {
conn = proxy.getServices().getConnectionManager().getConnection(connName);
if (conn != null) {
break;
services = proxy.getServices();
if (services != null) {
IRemoteConnectionManager connMgr = services.getConnectionManager();
if (connMgr != null) {
conn = connMgr.getConnection(connName);
if (conn != null) {
break;
}
}
}
}
}