summaryrefslogtreecommitdiff
path: root/sources/core/VSTask.java
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-06-11 11:00:13 +0000
committerPaul Buetow <paul@buetow.org>2008-06-11 11:00:13 +0000
commit4f9a13071e3aba7291711a62358ab83374321433 (patch)
tree0c4c70866c7389694876121643cb533d8dc2e558 /sources/core/VSTask.java
parent371b00f2c8bd3944d636e81ed0cb422b3d011ee3 (diff)
added color copy constructor in VSPrefs.
Diffstat (limited to 'sources/core/VSTask.java')
-rw-r--r--sources/core/VSTask.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/sources/core/VSTask.java b/sources/core/VSTask.java
index 9ca04e6..d5e4274 100644
--- a/sources/core/VSTask.java
+++ b/sources/core/VSTask.java
@@ -317,6 +317,9 @@ public class VSTask implements Comparable, VSSerializable {
* @see java.lang.Comparable#compareTo(java.lang.Object)
*/
public int compareTo(Object object) {
+ if (object == null)
+ return 0;
+
if (object instanceof VSTask) {
final VSTask task = (VSTask) object;
@@ -328,6 +331,9 @@ public class VSTask implements Comparable, VSSerializable {
VSAbstractEvent event2 = task.getEvent();
+ if (event2 == null || event == null)
+ return 0;
+
/* If it's a recovering, it should get handled very first */
boolean a = event instanceof VSProcessRecoverEvent;
boolean b = event2 instanceof VSProcessRecoverEvent;