mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +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:
parent
1296420f07
commit
b3dbbaca76
1 changed files with 9 additions and 3 deletions
|
@ -123,12 +123,18 @@ public class RemoteServicesUtils {
|
|||
conn = services.getConnectionManager().getConnection(connName);
|
||||
} else if (connName != null) {
|
||||
for (RemoteServicesDescriptor proxy : RemoteServicesImpl.getRemoteServiceDescriptors()) {
|
||||
conn = proxy.getServices().getConnectionManager().getConnection(connName);
|
||||
services = proxy.getServices();
|
||||
if (services != null) {
|
||||
IRemoteConnectionManager connMgr = services.getConnectionManager();
|
||||
if (connMgr != null) {
|
||||
conn = connMgr.getConnection(connName);
|
||||
if (conn != null) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If a connection was found then convert it to a URI.
|
||||
|
|
Loading…
Add table
Reference in a new issue