Merge pull request #2021 from nextcloud/IOOBE

Prevent index out of bounds exception
This commit is contained in:
Andy Scherzinger 2018-01-22 22:52:06 +01:00 committed by GitHub
commit fa05e04f66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -856,7 +856,8 @@ public class ReceiveExternalFilesActivity extends FileActivity
mStreamsToUpload = intent.getParcelableArrayListExtra(Intent.EXTRA_STREAM);
}
if (mStreamsToUpload == null || mStreamsToUpload.get(0) == null) {
if (mStreamsToUpload == null || mStreamsToUpload.size() == 0 ||
mStreamsToUpload.get(0) == null) {
mStreamsToUpload = null;
saveTextsFromIntent(intent);
}