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:
parent
1296420f07
commit
b3dbbaca76
1 changed files with 9 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue