mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-29 19:23:38 +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:
parent
e5c7bb64f7
commit
ce857c058c
1 changed files with 13 additions and 11 deletions
|
@ -189,19 +189,21 @@ public class ToolChainManager implements IToolChainManager {
|
||||||
public Collection<IToolChain> getToolChainsMatching(Map<String, String> properties) {
|
public Collection<IToolChain> getToolChainsMatching(Map<String, String> properties) {
|
||||||
init();
|
init();
|
||||||
List<IToolChain> tcs = new ArrayList<>();
|
List<IToolChain> tcs = new ArrayList<>();
|
||||||
for (IToolChain toolChain : orderedToolChains) {
|
if (orderedToolChains != null) {
|
||||||
boolean matches = true;
|
for (IToolChain toolChain : orderedToolChains) {
|
||||||
for (Map.Entry<String, String> property : properties.entrySet()) {
|
boolean matches = true;
|
||||||
String tcProperty = toolChain.getProperty(property.getKey());
|
for (Map.Entry<String, String> property : properties.entrySet()) {
|
||||||
if (tcProperty != null) {
|
String tcProperty = toolChain.getProperty(property.getKey());
|
||||||
if (!property.getValue().equals(tcProperty)) {
|
if (tcProperty != null) {
|
||||||
matches = false;
|
if (!property.getValue().equals(tcProperty)) {
|
||||||
break;
|
matches = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if (matches) {
|
||||||
if (matches) {
|
tcs.add(toolChain);
|
||||||
tcs.add(toolChain);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue