Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeProjectInfoManager.java')
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeProjectInfoManager.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeProjectInfoManager.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeProjectInfoManager.java
index 46e51b42e14..091f54abcb8 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeProjectInfoManager.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/index/QMakeProjectInfoManager.java
@@ -79,6 +79,11 @@ public class QMakeProjectInfoManager {
private static QMakeProjectInfo getQMakeProjectInfoFor(IProject project, boolean create) {
QMakeProjectInfo info;
synchronized (CACHE_SYNC) {
+ // If the cache is null then this must be a late notification after shutdown. We
+ // can't do anything so don't try.
+ if (CACHE == null)
+ return null;
+
info = CACHE.get(project);
if (info != null) {
return info;
@@ -98,6 +103,11 @@ public class QMakeProjectInfoManager {
private static void removeProjectFromCache(IResource project) {
QMakeProjectInfo info;
synchronized (CACHE_SYNC) {
+ // If the cache is null then this must be a late notification after shutdown. We
+ // can't do anything so don't try.
+ if (CACHE == null)
+ return;
+
info = CACHE.remove(project);
}
if (info != null) {
@@ -213,6 +223,11 @@ public class QMakeProjectInfoManager {
List<QMakeProjectInfo> infos;
synchronized (CACHE_SYNC) {
+ // If the cache is null then this must be a late notification after shutdown. We
+ // can't do anything so don't try.
+ if (CACHE == null)
+ return;
+
infos = new ArrayList<QMakeProjectInfo>(CACHE.values());
}
for (QMakeProjectInfo info : infos) {

Back to the top