Fixed crash when an upload is confirmed with no file selected
authorDavid A. Velasco <dvelasco@solidgear.es>
Tue, 8 Jan 2013 16:48:58 +0000 (17:48 +0100)
committerDavid A. Velasco <dvelasco@solidgear.es>
Tue, 8 Jan 2013 16:48:58 +0000 (17:48 +0100)
src/com/owncloud/android/ui/activity/UploadFilesActivity.java

index 3487d70..d6e9bff 100644 (file)
@@ -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();