From 49ab140a9d826d187a8b0d02efc880669da80326 Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Wed, 6 Jun 2012 11:08:27 -0700 Subject: [PATCH] Fixed a potential crash when trying to upload attachments for an unsynced task --- .../com/todoroo/astrid/actfm/sync/ActFmSyncService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncService.java b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncService.java index a32d2029d..03a69d4c0 100644 --- a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncService.java +++ b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncService.java @@ -597,7 +597,7 @@ public final class ActFmSyncService { taskPushThreads.incrementAndGet(); try { Task t = taskDao.fetch(fileMetadata.getValue(Metadata.TASK), Task.REMOTE_ID); - if (t == null || t.getValue(Task.REMOTE_ID) <= 0) + if (t == null || t.getValue(Task.REMOTE_ID) == null || t.getValue(Task.REMOTE_ID) <= 0) return; if (fileMetadata.getValue(FileMetadata.DELETION_DATE) > 0) deleteAttachment(fileMetadata);