Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorTorbjörn Svensson2020-03-08 16:57:51 +0000
committerTorbjörn Svensson2020-03-08 16:57:51 +0000
commit65eee1c0b0fe31f63b2043883d5560a7635a67f0 (patch)
tree68c5cc829b01c83062517905776d80299b3bf380 /core
parentb03db67d41d855e1bac324cdf17d063205d64283 (diff)
downloadorg.eclipse.cdt-65eee1c0b0fe31f63b2043883d5560a7635a67f0.tar.gz
org.eclipse.cdt-65eee1c0b0fe31f63b2043883d5560a7635a67f0.tar.xz
org.eclipse.cdt-65eee1c0b0fe31f63b2043883d5560a7635a67f0.zip
Bug 560636 - Fix a small potential race
In commit f69a613d726ae03fc22b50d68503c5aa5fda982e, a check for null and 0-length array was introduced, but the checks is not reliable unless the checked value is later used. Change-Id: Ifc32b369514ee03eeea21281a7af80616531af87 Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java
index e8bb1a3e6e8..30f4ae45f02 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java
@@ -3781,7 +3781,7 @@ public class CPPSemantics {
setTargetedFunctionsToUnknown(tmp);
ICPPConstructor[] ctors = type.getConstructors();
if (ctors != null && ctors.length > 0) {
- return CPPDeferredFunction.createForCandidates(type.getConstructors());
+ return CPPDeferredFunction.createForCandidates(ctors);
} else {
return new ProblemBinding(typeId, ISemanticProblem.BINDING_NOT_FOUND,
type.getNameCharArray());

Back to the top