[Android] Fix NullPointerException

Nicolas Pomepuy git at videolan.org
Thu Aug 5 05:25:53 UTC 2021


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Aug  4 06:45:16 2021 +0200| [d65efb84b61f6d603e216c9e8816fcdb7676acb4] | committer: Nicolas Pomepuy

Fix NullPointerException

> https://code.videolan.org/videolan/vlc-android/commit/d65efb84b61f6d603e216c9e8816fcdb7676acb4
---

 .../src/org/videolan/medialibrary/interfaces/media/MediaWrapper.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/medialibrary/src/org/videolan/medialibrary/interfaces/media/MediaWrapper.java b/medialibrary/src/org/videolan/medialibrary/interfaces/media/MediaWrapper.java
index 581ae10a0..efabf2d6c 100644
--- a/medialibrary/src/org/videolan/medialibrary/interfaces/media/MediaWrapper.java
+++ b/medialibrary/src/org/videolan/medialibrary/interfaces/media/MediaWrapper.java
@@ -399,7 +399,7 @@ public abstract class MediaWrapper extends MediaLibraryItem implements Parcelabl
     }
 
     public void updateMeta(MediaPlayer mediaPlayer) {
-        if ((!TextUtils.isEmpty(mTitle) && TextUtils.isEmpty(mDisplayTitle)) || !mDisplayTitle.equals(mTitle))
+        if ((!TextUtils.isEmpty(mTitle) && TextUtils.isEmpty(mDisplayTitle)) || (mDisplayTitle != null && !mDisplayTitle.equals(mTitle)))
             mDisplayTitle = mTitle;
         final IMedia media = mediaPlayer.getMedia();
         if (media == null)



More information about the Android mailing list