diff options
author | spingel | 2008-08-18 06:01:39 +0000 |
---|---|---|
committer | spingel | 2008-08-18 06:01:39 +0000 |
commit | 799d44916e06b7e48d760a27b9b39fd38c8f5df5 (patch) | |
tree | 9df65865b998fb20d312572a7b46c8d4a3e253ef | |
parent | 96bd243dcb07cf4c0026a3ca3430111735e14bdd (diff) | |
download | org.eclipse.mylyn.tasks-799d44916e06b7e48d760a27b9b39fd38c8f5df5.tar.gz org.eclipse.mylyn.tasks-799d44916e06b7e48d760a27b9b39fd38c8f5df5.tar.xz org.eclipse.mylyn.tasks-799d44916e06b7e48d760a27b9b39fd38c8f5df5.zip |
RESOLVED - bug 237396: Widget is disposed error when password prompt is displayed on shutdown
https://bugs.eclipse.org/bugs/show_bug.cgi?id=237396
2 files changed, 12 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(); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiInternal.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiInternal.java index 959e4a669..1ee2b481a 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiInternal.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiInternal.java @@ -781,6 +781,9 @@ public class TasksUiInternal { * @return Shell or <code>null</code> */ public static Shell getShell() { + if (!PlatformUI.isWorkbenchRunning() || PlatformUI.getWorkbench().isClosing()) { + return null; + } Shell modal = getModalShellExcluding(null); if (modal != null) { return modal; |