Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2015-12-07 19:18:57 +0000
committerThomas Wolf2015-12-07 19:18:57 +0000
commit2bc846114d3c920e779c7674cbe86c829e75969d (patch)
treee34ac5e1c08e7a10039a283b3af363653ea8a63c
parent0a871ac45d5f69fa97c49beddfe4437a61f87339 (diff)
downloadegit-2bc846114d3c920e779c7674cbe86c829e75969d.tar.gz
egit-2bc846114d3c920e779c7674cbe86c829e75969d.tar.xz
egit-2bc846114d3c920e779c7674cbe86c829e75969d.zip
Don't try to decorate inaccessible resources
Bug: 483784 Change-Id: I963be082d7b819781d46d3f82bd8dbc7fff42635 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/GitLightweightDecorator.java5
1 files changed, 4 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 c18e29e90c..1fe2c8d92a 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
@@ -198,10 +198,13 @@ public class GitLightweightDecorator extends LabelProvider implements
*/
private void decorateResource(@NonNull IResource resource,
IDecoration decoration) throws CoreException {
+ if (resource.getType() == IResource.ROOT || !resource.isAccessible()) {
+ return;
+ }
IndexDiffData indexDiffData = ResourceStateFactory.getInstance()
.getIndexDiffDataOrNull(resource);
- if(indexDiffData == null) {
+ if (indexDiffData == null) {
return;
}
IDecoratableResource decoratableResource = null;

Back to the top