[Android] DirectoryView: Fix unlikely crash

Jean-Baptiste Kempf git at videolan.org
Mon Oct 22 13:41:59 CEST 2012


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Oct 22 13:41:46 2012 +0200| [919b7ce55975d02475f52ce9211f5ed9c7eb8700] | committer: Jean-Baptiste Kempf

DirectoryView: Fix unlikely crash

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

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

diff --git a/vlc-android/src/org/videolan/vlc/gui/DirectoryViewFragment.java b/vlc-android/src/org/videolan/vlc/gui/DirectoryViewFragment.java
index cf41833..8df5d54 100644
--- a/vlc-android/src/org/videolan/vlc/gui/DirectoryViewFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/DirectoryViewFragment.java
@@ -145,7 +145,8 @@ public class DirectoryViewFragment extends SherlockListFragment implements ISort
     }
 
     public boolean isRootDirectory () {
-        if (mDirectoryAdapter.getmCurrentDir().equals(mDirectoryAdapter.getmRootDir())) {
+        if (mDirectoryAdapter.getmCurrentDir() != null &&
+            mDirectoryAdapter.getmCurrentDir().equals(mDirectoryAdapter.getmRootDir())) {
             return true;
         }
         return false;



More information about the Android mailing list