diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/language/settings/providers/CompilationDatabaseParser.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/language/settings/providers/CompilationDatabaseParser.java index 36fdfed7181..23a6c3fed8e 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/language/settings/providers/CompilationDatabaseParser.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/language/settings/providers/CompilationDatabaseParser.java @@ -398,6 +398,11 @@ public class CompilationDatabaseParser extends LanguageSettingsSerializableProvi // saved that is not stored in the project description (i.e. calls to setProperties) will be saved to the wrong instance so when we call setProjectDescription, our changes will be ignored. // So instead, restart the whole thing with the corresponding CompilationDatabaseParser instance in the writable config. IProject project = cfgDescription.getProjectDescription().getProject(); + if (!project.isAccessible()) { + // Project was probably closed while the job was waiting to start. + return Status.CANCEL_STATUS; + } + ICProjectDescription projectDescription = CCorePlugin.getDefault().getCoreModel() .getProjectDescription(project.getProject(), true); ICConfigurationDescription writableCfg = projectDescription