Преглед на файлове

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();