[Android] BrowserActivitY: fix possible crash

Jean-Baptiste Kempf git at videolan.org
Wed Oct 17 18:21:06 CEST 2012


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Oct 17 18:20:57 2012 +0200| [32794961c418c77a43253776ea9d1d18972653a5] | committer: Jean-Baptiste Kempf

BrowserActivitY: fix possible crash

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=32794961c418c77a43253776ea9d1d18972653a5
---

 vlc-android/src/org/videolan/vlc/gui/BrowserActivity.java |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/BrowserActivity.java b/vlc-android/src/org/videolan/vlc/gui/BrowserActivity.java
index ba5c94b..dc0eaf7 100644
--- a/vlc-android/src/org/videolan/vlc/gui/BrowserActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/BrowserActivity.java
@@ -86,6 +86,9 @@ public class BrowserActivity extends ListActivity {
     }
 
     private void openDir(File file) {
+        if (!file.exists() || file.getPath() == null)
+            return;
+
         mAdapter.clear();
         mCurrentDir = file;
         File[] files = file.listFiles(new DirFilter());



More information about the Android mailing list