android/experimental/LOAndroid3/src/java/org/libreoffice/ui/FolderIconView.java 
|    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit c13a1c2e5ce6ea0b78e46f314c1980a4f0c7a2f4
Author: Jacobo Aragunde Pérez <jaragu...@igalia.com>
Date:   Tue Dec 2 17:34:01 2014 +0000

    Android: prevent NPE due to lack of permissions on a directory
    
    Change-Id: Ia2f4c04ad4c524e8b72870acb0735793624f0916
    Reviewed-on: https://gerrit.libreoffice.org/13278
    Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>
    Tested-by: Miklos Vajna <vmik...@collabora.co.uk>

diff --git 
a/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/FolderIconView.java
 
b/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/FolderIconView.java
index 5960e5e..723e361 100644
--- 
a/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/FolderIconView.java
+++ 
b/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/FolderIconView.java
@@ -83,6 +83,10 @@ public class FolderIconView extends View{
         if( dir == null )
             return;//TODO
         File[] contents = dir.listFiles();//TODO consider filtering thumbs to 
match grid.
+        if( contents == null )
+            // dir is not a directory,
+            // or user does not have permissions to read it
+            return;
         Stack<Bitmap> thumbs = new Stack<Bitmap>();
         BitmapFactory factory = new BitmapFactory();
         for( File file : contents ){
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to