Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2016-05-24 14:31:14 +0000
committerGerrit Code Review @ Eclipse.org2016-05-24 14:31:16 +0000
commit7f18b36ecb95dc8fef97569f225e6ba556a3cedb (patch)
treea41b007fe2d95d62024a86209a2670c5fc34e11e
parent8a901ff4d012f4e9c8e5395c6c66d061e6a93cdc (diff)
parentd72c53924bf320d0925100343c2f45a314f5f3b5 (diff)
downloadegit-7f18b36ecb95dc8fef97569f225e6ba556a3cedb.tar.gz
egit-7f18b36ecb95dc8fef97569f225e6ba556a3cedb.tar.xz
egit-7f18b36ecb95dc8fef97569f225e6ba556a3cedb.zip
Merge "Fix NPE in ResourceUtil.isSharedWithGit()"
-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