diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/cdtvariables/SupplierBasedCdtVariableSubstitutor.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/cdtvariables/SupplierBasedCdtVariableSubstitutor.java index ff128c1e4d9..87f3085594e 100644 --- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/cdtvariables/SupplierBasedCdtVariableSubstitutor.java +++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/cdtvariables/SupplierBasedCdtVariableSubstitutor.java @@ -285,7 +285,11 @@ public class SupplierBasedCdtVariableSubstitutor implements IVariableSubstitutor } protected ResolvedMacro resolveMacro(String macroName) throws CdtVariableException{ - return resolveMacro(SupplierBasedCdtVariableManager.getVariable(macroName,fContextInfo,true)); + ICdtVariable variable = SupplierBasedCdtVariableManager.getVariable(macroName,fContextInfo,true); + if (variable == null) + return null; + + return resolveMacro(variable); } protected ResolvedMacro resolveParentMacro(MacroDescriptor macroDes) throws CdtVariableException{