[Android] Prevent NPE

Geoffrey Métais git at videolan.org
Fri Jul 17 15:43:34 CEST 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Jul 17 11:46:26 2015 +0200| [52dd72d82992f1ed938536b19aca2a9fd6b3db2d] | committer: Geoffrey Métais

Prevent NPE

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

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

diff --git a/vlc-android/tv/src/org/videolan/vlc/gui/tv/browser/MusicFragment.java b/vlc-android/tv/src/org/videolan/vlc/gui/tv/browser/MusicFragment.java
index 07fa357..54ec8f5 100644
--- a/vlc-android/tv/src/org/videolan/vlc/gui/tv/browser/MusicFragment.java
+++ b/vlc-android/tv/src/org/videolan/vlc/gui/tv/browser/MusicFragment.java
@@ -260,7 +260,8 @@ public class MusicFragment extends MediaLibBrowserFragment {
             super.handleMessage(msg);
             switch (msg.what){
                 case MediaLibrary.MEDIA_ITEMS_UPDATED:
-                    getOwner().updateList();
+                    if (getOwner() != null)
+                        getOwner().updateList();
                     break;
             }
         }



More information about the Android mailing list