[Android] DirectoryAdapter: don't lose the link to the parent

Edward Wang git at videolan.org
Tue Mar 19 02:28:39 CET 2013


vlc-ports/android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Mon Mar 18 21:25:46 2013 -0400| [428c012304feb7b006a7438cd59bca0e6dc4da6a] | committer: Edward Wang

DirectoryAdapter: don't lose the link to the parent

Creating a new node loses the .parent reference, leading to NullPointerExceptions.

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

 vlc-android/src/org/videolan/vlc/gui/DirectoryAdapter.java |    2 --
 1 file changed, 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/DirectoryAdapter.java b/vlc-android/src/org/videolan/vlc/gui/DirectoryAdapter.java
index 8d2a5b7..1df6010 100644
--- a/vlc-android/src/org/videolan/vlc/gui/DirectoryAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/DirectoryAdapter.java
@@ -420,8 +420,6 @@ public class DirectoryAdapter extends BaseAdapter {
         for(DirectoryAdapter.Node n : this.mCurrentNode.children)
             n.children.clear();
         this.mCurrentNode.children.clear();
-
-        this.mCurrentNode = new DirectoryAdapter.Node(mCurrentDir);
         this.populateNode(mCurrentNode, mCurrentDir);
 
         this.notifyDataSetChanged();



More information about the Android mailing list