Kaydet (Commit) c13a1c2e authored tarafından Jacobo Aragunde Pérez's avatar Jacobo Aragunde Pérez Kaydeden (comit) Miklos Vajna

Android: prevent NPE due to lack of permissions on a directory

Change-Id: Ia2f4c04ad4c524e8b72870acb0735793624f0916
Reviewed-on: https://gerrit.libreoffice.org/13278Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 8c68463d
......@@ -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 ){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment