diff options
author | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2016-07-02 17:20:52 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2016-07-02 17:20:52 +0200 |
commit | 66be4feef7e0d3661f01fbb2372700de5eeea070 (patch) | |
tree | 1b1ef1ae7892ccb49fd57a2251694d3b09dbedbe /android | |
parent | 3b219e5487ae274722f0c4cef7f24f9246bf6abd (diff) |
android: prevent crash if storage is unavailable
Change-Id: I350acc1735d5fd22a27434fc5ccf2ab39bf3d2cf
Diffstat (limited to 'android')
-rw-r--r-- | android/source/src/java/org/libreoffice/storage/external/ExtsdDocumentsProvider.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/android/source/src/java/org/libreoffice/storage/external/ExtsdDocumentsProvider.java b/android/source/src/java/org/libreoffice/storage/external/ExtsdDocumentsProvider.java index 49b441e3a222..abbfca9c6221 100644 --- a/android/source/src/java/org/libreoffice/storage/external/ExtsdDocumentsProvider.java +++ b/android/source/src/java/org/libreoffice/storage/external/ExtsdDocumentsProvider.java @@ -59,6 +59,9 @@ public class ExtsdDocumentsProvider implements IExternalDocumentProvider, String internalSDPath = internalSD.getAbsolutePath(); for (File option: options) { + // Returned paths may be null if a storage device is unavailable. + if (null == option) { continue; } + String optionPath = option.getAbsolutePath(); if(optionPath.contains(internalSDPath)) |