Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2007-06-26 10:07:20 -0400
committermkersten2007-06-26 10:07:20 -0400
commit749385bb605fab50d8f3f492e51e648759333ff8 (patch)
tree8a71a8dfb82dfc7f205fc51ba8bd8f572c11781e
parentd40ef3ea343a86748d5f64a8eee18f7bfecb162c (diff)
downloadorg.eclipse.mylyn.tasks-749385bb605fab50d8f3f492e51e648759333ff8.tar.gz
org.eclipse.mylyn.tasks-749385bb605fab50d8f3f492e51e648759333ff8.tar.xz
org.eclipse.mylyn.tasks-749385bb605fab50d8f3f492e51e648759333ff8.zip
RESOLVED - bug 194341: Could not save task list during shutdown
https://bugs.eclipse.org/bugs/show_bug.cgi?id=194341
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesView.java14
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskListManager.java2
2 files changed, 9 insertions, 7 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesView.java
index 74d534c41..0c81ab6b5 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesView.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesView.java
@@ -91,12 +91,14 @@ public class TaskRepositoriesView extends ViewPart {
}
public static TaskRepositoriesView getFromActivePerspective() {
- IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- if (activePage == null)
- return null;
- IViewPart view = activePage.findView(ID);
- if (view instanceof TaskRepositoriesView)
- return (TaskRepositoriesView) view;
+ if (PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null) {
+ IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ if (activePage == null)
+ return null;
+ IViewPart view = activePage.findView(ID);
+ if (view instanceof TaskRepositoriesView)
+ return (TaskRepositoriesView) view;
+ }
return null;
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskListManager.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskListManager.java
index ea3d0fb4b..5ba9d9e51 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskListManager.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskListManager.java
@@ -798,7 +798,7 @@ public class TaskListManager implements IPropertyChangeListener {
*/
public synchronized void saveTaskList() {
try {
- if (taskListInitialized) {
+ if (taskListInitialized && taskListSaveManager != null) {
taskListSaveManager.saveTaskList(true, false);
// TasksUiPlugin.getDefault().getPreferenceStore().setValue(TaskListPreferenceConstants.TASK_ID,
// nextLocalTaskId);

Back to the top