From 35b25f04ebb3c8ef78349c18b98e98ac6257a6ea Mon Sep 17 00:00:00 2001 From: "David A. Velasco" Date: Wed, 9 Jan 2013 10:11:21 +0100 Subject: [PATCH] Fixed crash in test of files downloading / uploading --- src/com/owncloud/android/files/services/FileDownloader.java | 1 + src/com/owncloud/android/files/services/FileUploader.java | 1 + 2 files changed, 2 insertions(+) diff --git a/src/com/owncloud/android/files/services/FileDownloader.java b/src/com/owncloud/android/files/services/FileDownloader.java index b01d61e9c2..7872c3677c 100644 --- a/src/com/owncloud/android/files/services/FileDownloader.java +++ b/src/com/owncloud/android/files/services/FileDownloader.java @@ -198,6 +198,7 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis * @param file A file that could be in the queue of downloads. */ public boolean isDownloading(Account account, OCFile file) { + if (account == null || file == null) return false; String targetKey = buildRemoteName(account, file); synchronized (mPendingDownloads) { if (file.isDirectory()) { diff --git a/src/com/owncloud/android/files/services/FileUploader.java b/src/com/owncloud/android/files/services/FileUploader.java index 0887ac1f6b..0a03346973 100644 --- a/src/com/owncloud/android/files/services/FileUploader.java +++ b/src/com/owncloud/android/files/services/FileUploader.java @@ -324,6 +324,7 @@ public class FileUploader extends Service implements OnDatatransferProgressListe * @param file A file that could be in the queue of pending uploads */ public boolean isUploading(Account account, OCFile file) { + if (account == null || file == null) return false; String targetKey = buildRemoteName(account, file); synchronized (mPendingUploads) { if (file.isDirectory()) {