From ffc4272acb850883b9f7dde273392e8990e9f051 Mon Sep 17 00:00:00 2001 From: Jonah Graham Date: Mon, 14 Jun 2021 15:40:23 -0400 Subject: [PATCH] Fix NPE on projects which aren't full CDT projects Change-Id: I4b611fe032eca9c5657d493fc60d6451bd6ddf7d --- core/org.eclipse.cdt.ui/META-INF/MANIFEST.MF | 2 +- .../org/eclipse/cdt/internal/ui/text/doctools/ProjectMap.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/org.eclipse.cdt.ui/META-INF/MANIFEST.MF b/core/org.eclipse.cdt.ui/META-INF/MANIFEST.MF index 90c70d3113f..334f57a3475 100644 --- a/core/org.eclipse.cdt.ui/META-INF/MANIFEST.MF +++ b/core/org.eclipse.cdt.ui/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.cdt.ui; singleton:=true -Bundle-Version: 7.2.0.qualifier +Bundle-Version: 7.2.100.qualifier Bundle-Activator: org.eclipse.cdt.ui.CUIPlugin Bundle-Vendor: %providerName Bundle-Localization: plugin diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/doctools/ProjectMap.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/doctools/ProjectMap.java index 3cb15089465..7d5181fb1b5 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/doctools/ProjectMap.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/doctools/ProjectMap.java @@ -142,6 +142,9 @@ class ProjectMap { */ public void save() throws CoreException { ICProjectDescription pd = CCorePlugin.getDefault().getProjectDescription(fProject, true); + if (pd == null) { + return; + } // remove current associations ICStorageElement data = pd.getStorage(ATTRVAL_STORAGEID, true);