aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Baumgart2010-08-06 10:27:45 (EDT)
committerChris Aniszczyk2010-08-08 19:39:03 (EDT)
commitf920b5a3484f5fbaa5ecf67a7fdfa360a89237e0 (patch)
tree615eafbed0370bb3321528c1bb2cf373a9255418
parent74510d09b9c5b18f4f7e273941d305d7f1ced95e (diff)
downloadegit-f920b5a3484f5fbaa5ecf67a7fdfa360a89237e0.zip
egit-f920b5a3484f5fbaa5ecf67a7fdfa360a89237e0.tar.gz
egit-f920b5a3484f5fbaa5ecf67a7fdfa360a89237e0.tar.bz2
Fix exception in decoratorrefs/changes/58/1258/2
Fixes an exception logged on rebuild. Bug: 321987 Change-Id: I14890142dd8cc3e2f67c28fb5e548a531b4706a7 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/GitLightweightDecorator.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/GitLightweightDecorator.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/GitLightweightDecorator.java
index 35ba7e7..3d1b6fa 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/GitLightweightDecorator.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/GitLightweightDecorator.java
@@ -21,6 +21,7 @@ import java.util.HashSet;
import java.util.Map;
import java.util.Set;
+import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceChangeEvent;
@@ -600,7 +601,12 @@ public class GitLightweightDecorator extends LabelProvider implements
// All seems good, schedule the resource for update
if (Constants.GITIGNORE_FILENAME.equals(resource.getName())) {
// re-decorate all container members when .gitignore changes
- resourcesToUpdate.addAll(Arrays.asList(resource.getParent().members()));
+ IContainer parent = resource.getParent();
+ if (parent.exists())
+ resourcesToUpdate.addAll(Arrays.asList(parent
+ .members()));
+ else
+ return false;
} else {
resourcesToUpdate.add(resource);
}