浏览代码

Fixed crash when an upload is confirmed with no file selected

David A. Velasco 12 年之前
父节点
当前提交
a1a31b68d9
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/com/owncloud/android/ui/activity/UploadFilesActivity.java

+ 1 - 1
src/com/owncloud/android/ui/activity/UploadFilesActivity.java

@@ -314,7 +314,7 @@ public class UploadFilesActivity extends SherlockFragmentActivity implements
         protected Boolean doInBackground(Void... params) {
             String[] checkedFilePaths = mFileListFragment.getCheckedFilePaths();
             long total = 0;
-            for (int i=0; i < checkedFilePaths.length ; i++) {
+            for (int i=0; checkedFilePaths != null && i < checkedFilePaths.length ; i++) {
                 String localPath = checkedFilePaths[i];
                 File localFile = new File(localPath);
                 total += localFile.length();