Browse Source

Fix another NPE in FileDownloader

Signed-off-by: Álvaro Brey Vilas <alvaro.brey@nextcloud.com>
Álvaro Brey Vilas 3 years ago
parent
commit
dd07ea17dd

+ 1 - 1
src/main/java/com/owncloud/android/files/services/FileDownloader.java

@@ -105,7 +105,7 @@ public class FileDownloader extends Service
     private ServiceHandler mServiceHandler;
     private IBinder mBinder;
     private OwnCloudClient mDownloadClient;
-    private Optional<User> currentUser;
+    private Optional<User> currentUser = Optional.empty();
     private FileDataStorageManager mStorageManager;
 
     private IndexedForest<DownloadFileOperation> mPendingDownloads = new IndexedForest<>();