[Android] Fix an unlikely crash

Jean-Baptiste Kempf git at videolan.org
Wed Jul 4 13:15:20 CEST 2012


android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Jul  4 13:15:09 2012 +0200| [dd0359929977da009fd3897c6b91f867d51a8917] | committer: Jean-Baptiste Kempf

Fix an unlikely crash

> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=dd0359929977da009fd3897c6b91f867d51a8917
---

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

diff --git a/vlc-android/src/org/videolan/vlc/gui/BrowserAdapter.java b/vlc-android/src/org/videolan/vlc/gui/BrowserAdapter.java
index 94fe0cf..355de3f 100644
--- a/vlc-android/src/org/videolan/vlc/gui/BrowserAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/BrowserAdapter.java
@@ -115,7 +115,8 @@ public class BrowserAdapter extends ArrayAdapter<File>
                 File tmpFile = item;
                 while (!tmpFile.getPath().equals("/")) {
                     tmpFile = tmpFile.getParentFile();
-                    dbManager.removeDir(tmpFile.getPath());
+                    if (tmpFile != null)
+                        dbManager.removeDir(tmpFile.getPath());
                 }
             } else {
                 dbManager.removeDir(item.getPath());



More information about the Android mailing list