[Android] Fix possible NullPointerException

Jean-Baptiste Kempf git at videolan.org
Fri Sep 28 12:09:26 CEST 2012


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Sep 28 12:08:12 2012 +0200| [bca0b213994af2712eb59f66d521c9629f375c85] | committer: Jean-Baptiste Kempf

Fix possible NullPointerException

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

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

diff --git a/vlc-android/src/org/videolan/vlc/gui/DirectoryViewFragment.java b/vlc-android/src/org/videolan/vlc/gui/DirectoryViewFragment.java
index 35d9ff8..6e9bc5d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/DirectoryViewFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/DirectoryViewFragment.java
@@ -164,7 +164,7 @@ public class DirectoryViewFragment extends SherlockListFragment implements ISort
     }
 
     public void refresh() {
-        mDirectoryAdapter.clear();
+        if (mDirectoryAdapter != null)
+            mDirectoryAdapter.clear();
     }
-
 }



More information about the Android mailing list