1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 535139 - Container target set-up causes NPE

- add null check before accessing ordered tool chains

Change-Id: I713a55f8e887b642aa4a159e59c454de9a97955a
This commit is contained in:
Jeff Johnston 2018-05-25 15:28:34 -04:00 committed by Jonah Graham
parent e5c7bb64f7
commit ce857c058c

View file

@ -189,6 +189,7 @@ public class ToolChainManager implements IToolChainManager {
public Collection<IToolChain> getToolChainsMatching(Map<String, String> properties) {
init();
List<IToolChain> tcs = new ArrayList<>();
if (orderedToolChains != null) {
for (IToolChain toolChain : orderedToolChains) {
boolean matches = true;
for (Map.Entry<String, String> property : properties.entrySet()) {
@ -204,6 +205,7 @@ public class ToolChainManager implements IToolChainManager {
tcs.add(toolChain);
}
}
}
return tcs;
}