From f96887cb357065bee055a39abbca5c861d4d40ad Mon Sep 17 00:00:00 2001 From: Doug Schaefer Date: Wed, 24 Jul 2019 21:20:38 -0400 Subject: [PATCH] Don't add null parser ids to the list of binary parsers. This started happening when I added the ErrorBuildConfiguration which returns a null id. This happens when you create a CMake project and add a new launch target. Not totally sure how we got an error config for that. Will investigate that later. Change-Id: I1a4e7c528d2cee101a432d386ad6a7505b9983b6 --- .../org/eclipse/cdt/internal/core/model/CModelManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java index b9856487bd9..47d2fb12516 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java @@ -618,7 +618,10 @@ public class CModelManager implements IResourceChangeListener, IContentTypeChang for (IBuildConfiguration config : project.getBuildConfigs()) { ICBuildConfiguration cconfig = config.getAdapter(ICBuildConfiguration.class); if (cconfig != null) { - parserIds.add(cconfig.getBinaryParserId()); + String id = cconfig.getBinaryParserId(); + if (id != null) { + parserIds.add(cconfig.getBinaryParserId()); + } } } if (!parserIds.isEmpty()) {