Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryLocationUi.java')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryLocationUi.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryLocationUi.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryLocationUi.java
index 1d61d5272..9a87cdadf 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryLocationUi.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskRepositoryLocationUi.java
@@ -53,11 +53,15 @@ public class TaskRepositoryLocationUi extends TaskRepositoryLocation {
}
PasswordRunner runner = new PasswordRunner(authType, message);
- PlatformUI.getWorkbench().getDisplay().syncExec(runner);
- if (runner.isCanceled()) {
- throw new OperationCanceledException();
- }
- if (!runner.isChanged()) {
+ if (!PlatformUI.getWorkbench().getDisplay().isDisposed()) {
+ PlatformUI.getWorkbench().getDisplay().syncExec(runner);
+ if (runner.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+ if (!runner.isChanged()) {
+ throw new UnsupportedRequestException();
+ }
+ } else {
throw new UnsupportedRequestException();
}
}

Back to the top