Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2003-07-16 13:38:08 +0000
committerJean Michel-Lemieux2003-07-16 13:38:08 +0000
commit18ebc7fe4f12a1d6a14ad2e1ebcfa03edfe1e45d (patch)
treedcd922cc04371becbfb03613ba5bb162109a8f7a
parent7ac4f96af758a804b3cd0f1f787923f823880301 (diff)
downloadeclipse.platform.team-18ebc7fe4f12a1d6a14ad2e1ebcfa03edfe1e45d.tar.gz
eclipse.platform.team-18ebc7fe4f12a1d6a14ad2e1ebcfa03edfe1e45d.tar.xz
eclipse.platform.team-18ebc7fe4f12a1d6a14ad2e1ebcfa03edfe1e45d.zip
Possible NPE in run
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/jobs/RefreshSubscriberJob.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/jobs/RefreshSubscriberJob.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/jobs/RefreshSubscriberJob.java
index a2f084247..220bc16f8 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/jobs/RefreshSubscriberJob.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/jobs/RefreshSubscriberJob.java
@@ -118,7 +118,13 @@ public class RefreshSubscriberJob extends Job {
public IStatus run(IProgressMonitor monitor) {
MultiStatus status = new MultiStatus(TeamPlugin.ID, TeamException.UNABLE, Policy.bind("Team.errorRefreshingSubscribers"), null);
TeamSubscriber subscriber = getSubscriber();
- IResource[] roots = getResources();
+ IResource[] roots = getResources();
+
+ // if there are no resources to refresh, just return
+ if(subscriber == null || resources == null) {
+ return Status.OK_STATUS;
+ }
+
monitor.beginTask(Policy.bind("RefreshSubscriber.runTitle", subscriber.getName()), 100);
try {
lastTimeRun = System.currentTimeMillis();

Back to the top