Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2005-06-18 00:06:50 +0000
committermkersten2005-06-18 00:06:50 +0000
commit52619c9873c7f83d9fe54bf341b60819a412e1d3 (patch)
tree2a23ca79b7fbdb62b52151d65c9c2383daa13b4d
parent54ae0a69725775cbd71fd370d433dde844f4503a (diff)
downloadorg.eclipse.mylyn.tasks-52619c9873c7f83d9fe54bf341b60819a412e1d3.tar.gz
org.eclipse.mylyn.tasks-52619c9873c7f83d9fe54bf341b60819a412e1d3.tar.xz
org.eclipse.mylyn.tasks-52619c9873c7f83d9fe54bf341b60819a412e1d3.zip
Guard against npe
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java
index d4c71ca84..d3beafdc5 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java
@@ -809,8 +809,10 @@ public class TaskListView extends ViewPart {
@Override
public void run() {
Object selectedObject = ((IStructuredSelection)viewer.getSelection()).getFirstElement();
- MylarPlugin.getTaskscapeManager().taskDeleted(((Task)selectedObject).getHandle(), ((Task)selectedObject).getPath());
- viewer.refresh();
+ if (selectedObject != null) {
+ MylarPlugin.getTaskscapeManager().taskDeleted(((Task)selectedObject).getHandle(), ((Task)selectedObject).getPath());
+ viewer.refresh();
+ }
}
};
clearSelectedTaskscapeAction.setText("Erase Taskscape");

Back to the top