[Android] Avoid NPE if media is null

Geoffrey Métais git at videolan.org
Thu Mar 19 12:46:37 CET 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Mar 19 12:46:16 2015 +0100| [bb3c78604131c7c53697bb95326cccb821f116cb] | committer: Geoffrey Métais

Avoid NPE if media is null

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

 .../tv/src/org/videolan/vlc/gui/tv/RecommendationsService.java       |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/vlc-android/tv/src/org/videolan/vlc/gui/tv/RecommendationsService.java b/vlc-android/tv/src/org/videolan/vlc/gui/tv/RecommendationsService.java
index 8d1e2c0..c05124a 100644
--- a/vlc-android/tv/src/org/videolan/vlc/gui/tv/RecommendationsService.java
+++ b/vlc-android/tv/src/org/videolan/vlc/gui/tv/RecommendationsService.java
@@ -71,6 +71,8 @@ public class RecommendationsService extends IntentService {
         }
     }
     private static void buildRecommendation(MediaWrapper movie) {
+        if (movie == null)
+            return;
 
         if (sNotificationManager == null) {
             sNotificationManager = (NotificationManager)



More information about the Android mailing list