소스 검색

Fix #2439 NPE via null check

AndyScherzinger 7 년 전
부모
커밋
c18a44b044
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/main/java/com/owncloud/android/operations/UploadFileOperation.java

+ 1 - 1
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);