[Android] src: Check for NULL in VideoListFragment's WeakHandler

Edward Wang git at videolan.org
Fri Aug 3 17:07:54 CEST 2012


android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Fri Aug  3 11:07:54 2012 -0400| [7d9f2119f21b8468b7b8adecf35867d63900ef61] | committer: Edward Wang

src: Check for NULL in VideoListFragment's WeakHandler

> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=7d9f2119f21b8468b7b8adecf35867d63900ef61
---

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

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoListFragment.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoListFragment.java
index a3d6705..b660fb6 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoListFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoListFragment.java
@@ -200,6 +200,8 @@ public class VideoListFragment extends SherlockListFragment implements ISortable
         @Override
         public void handleMessage(Message msg) {
             VideoListFragment fragment = getOwner();
+            if(fragment == null) return;
+
             switch (msg.what) {
                 case UPDATE_ITEM:
                     fragment.updateItem();



More information about the Android mailing list