[Android] BrowserAdapter: avoid a crash
Jean-Baptiste Kempf
git at videolan.org
Wed Oct 17 18:14:46 CEST 2012
vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Oct 17 18:14:40 2012 +0200| [72880d32e1ff36b5183970f92ab4b7301a42f49c] | committer: Jean-Baptiste Kempf
BrowserAdapter: avoid a crash
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=72880d32e1ff36b5183970f92ab4b7301a42f49c
---
vlc-android/src/org/videolan/vlc/gui/BrowserAdapter.java | 2 +-
1 file changed, 1 insertion(+), 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 355de3f..84a9103 100644
--- a/vlc-android/src/org/videolan/vlc/gui/BrowserAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/BrowserAdapter.java
@@ -113,7 +113,7 @@ public class BrowserAdapter extends ArrayAdapter<File>
if (buttonView.isEnabled() && isChecked) {
dbManager.addDir(item.getPath());
File tmpFile = item;
- while (!tmpFile.getPath().equals("/")) {
+ while (tmpFile.getPath() != null && !tmpFile.getPath().equals("/")) {
tmpFile = tmpFile.getParentFile();
if (tmpFile != null)
dbManager.removeDir(tmpFile.getPath());
More information about the Android
mailing list