From: David A. Velasco Date: Wed, 9 Jan 2013 09:11:21 +0000 (+0100) Subject: Fixed crash in test of files downloading / uploading X-Git-Tag: oc-android-1.4.3~73 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/35b25f04ebb3c8ef78349c18b98e98ac6257a6ea Fixed crash in test of files downloading / uploading --- diff --git a/src/com/owncloud/android/files/services/FileDownloader.java b/src/com/owncloud/android/files/services/FileDownloader.java index b01d61e9..7872c367 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 0887ac1f..0a033469 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()) {