Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMarco Stornelli2020-06-13 06:33:09 +0000
committerMarco Stornelli2020-06-13 14:56:29 +0000
commit51398ca2ae4890a8e7101cc81e1192c6674d928f (patch)
treec9943180857efd456e4e5b051001d5c55b7e424b /core
parentef2ee6df714b508233543c38dbfce13f6b76f153 (diff)
downloadorg.eclipse.cdt-51398ca2ae4890a8e7101cc81e1192c6674d928f.tar.gz
org.eclipse.cdt-51398ca2ae4890a8e7101cc81e1192c6674d928f.tar.xz
org.eclipse.cdt-51398ca2ae4890a8e7101cc81e1192c6674d928f.zip
Bug 564026 - Fix null pointer exception
The ICPPFunction array can contain null values. A check is needed. Change-Id: Icde40880f7913d0de7ae2c0a293de8d5be899327
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVariableReadWriteFlags.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVariableReadWriteFlags.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVariableReadWriteFlags.java
index 12e18c5e981..d3029a98176 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVariableReadWriteFlags.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVariableReadWriteFlags.java
@@ -186,6 +186,9 @@ public final class CPPVariableReadWriteFlags extends VariableReadWriteFlags {
int argPos = ArrayUtil.indexOf(args, argument);
Optional<Integer> cumulative = Optional.empty();
for (ICPPFunction f : candidates) {
+ if (f == null) {
+ continue;
+ }
IType type = f.getType();
if (type instanceof IFunctionType) {
Optional<Integer> res = rwArgumentForFunctionCall((IFunctionType) type, argPos,

Back to the top