From c18a44b044ee9a553e98c87e3f7629ca561a2c93 Mon Sep 17 00:00:00 2001 From: AndyScherzinger Date: Mon, 9 Apr 2018 23:14:39 +0200 Subject: [PATCH] Fix #2439 NPE via null check --- .../com/owncloud/android/operations/UploadFileOperation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/owncloud/android/operations/UploadFileOperation.java b/src/main/java/com/owncloud/android/operations/UploadFileOperation.java index e9a594df09..ae0faa5277 100644 --- a/src/main/java/com/owncloud/android/operations/UploadFileOperation.java +++ b/src/main/java/com/owncloud/android/operations/UploadFileOperation.java @@ -396,7 +396,7 @@ public class UploadFileOperation extends SyncOperation { // try to unlock folder with stored token, e.g. when upload needs to be resumed or app crashed // the parent folder should exist as it is a resume of a broken upload - if (!mFolderUnlockToken.isEmpty()) { + if (mFolderUnlockToken != null && !mFolderUnlockToken.isEmpty()) { UnlockFileOperation unlockFileOperation = new UnlockFileOperation(parent.getLocalId(), mFolderUnlockToken); RemoteOperationResult unlockFileOperationResult = unlockFileOperation.execute(client, true);