Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2016-05-23 22:13:17 +0000
committerMatthias Sohn2016-05-23 22:13:17 +0000
commitd72c53924bf320d0925100343c2f45a314f5f3b5 (patch)
tree4aed652df9956c2f16f7af837ac7a81245cc045a
parent118f42f3321c2aa9e98c1e5d388d43950865b877 (diff)
downloadegit-d72c53924bf320d0925100343c2f45a314f5f3b5.tar.gz
egit-d72c53924bf320d0925100343c2f45a314f5f3b5.tar.xz
egit-d72c53924bf320d0925100343c2f45a314f5f3b5.zip
Fix NPE in ResourceUtil.isSharedWithGit()
Bug: 494356 Change-Id: I005c765b2d116c4f6c6b00c9cc2121a1c0cd6fef Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/GitProvider.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/GitProvider.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/GitProvider.java
index 159822994a..6ceaa75198 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/GitProvider.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/GitProvider.java
@@ -11,6 +11,7 @@ package org.eclipse.egit.core;
import java.io.IOException;
+import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResourceRuleFactory;
import org.eclipse.core.resources.team.IMoveDeleteHook;
import org.eclipse.core.resources.team.ResourceRuleFactory;
@@ -100,7 +101,10 @@ public class GitProvider extends RepositoryProvider {
@Nullable
public synchronized GitProjectData getData() {
if (data == null) {
- data = GitProjectData.get(getProject());
+ IProject project = getProject();
+ if (project != null) {
+ data = GitProjectData.get(project);
+ }
}
return data;
}

Back to the top