Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantTree.java')
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantTree.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantTree.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantTree.java
index 3eec66b762..240f828ef0 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantTree.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantTree.java
@@ -164,9 +164,11 @@ abstract class GitResourceVariantTree extends AbstractResourceVariantTree {
Tree tree = getRevTree(resource);
ObjectId objId = getRevObjId(resource);
- trees.put(db, tree);
- // walk the tree to retrieve information
- walk(db, objId, tree);
+ if (objId != null && tree != null) {
+ trees.put(db, tree);
+ // walk the tree to retrieve information
+ walk(db, objId, tree);
+ }
}
}
@@ -387,6 +389,10 @@ abstract class GitResourceVariantTree extends AbstractResourceVariantTree {
Repository repo = gsd.getRepository();
try {
Tree tree = gsd.mapSrcTree();
+
+ if (tree == null)
+ return new IResource[0];
+
IResource[] members = ((IContainer) resource).members();
Set<IResource> membersSet = getAllMembers(repo, tree, members);

Back to the top