From 1c022521464557d46491424bccdeb20b1aa78744 Mon Sep 17 00:00:00 2001
From: Andrew Gvozdev <angvoz.dev@gmail.com>
Date: Tue, 30 Apr 2013 17:46:22 -0400
Subject: [PATCH] Avoid updating non-existing project. Problem reported by
 JUnit.

---
 .../cdt/internal/core/model/SetPathEntriesOperation.java     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SetPathEntriesOperation.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SetPathEntriesOperation.java
index 7aa2dfa93a0..dd4d9512654 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SetPathEntriesOperation.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SetPathEntriesOperation.java
@@ -63,8 +63,11 @@ public class SetPathEntriesOperation extends CModelOperation {
 
 		try {
 			IProject projectResource = cproject.getProject();
-			IProjectDescription description = projectResource.getDescription();
+			if (!projectResource.isAccessible()) {
+				return;
+			}
 
+			IProjectDescription description = projectResource.getDescription();
 			IProject[] projectReferences = description.getReferencedProjects();
 
 			HashSet<String> oldReferences = new HashSet<String>(projectReferences.length);