From 54952f11a52a447efedbfacabea0f68132d8cd82 Mon Sep 17 00:00:00 2001 From: Albert Vaca Cintora Date: Tue, 7 Mar 2023 15:41:49 +0100 Subject: [PATCH] Fix NPE --- .../kdeconnect/Plugins/MprisPlugin/MprisNowPlayingFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisNowPlayingFragment.java b/src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisNowPlayingFragment.java index b2184e72..01c1d7c7 100644 --- a/src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisNowPlayingFragment.java +++ b/src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisNowPlayingFragment.java @@ -255,7 +255,7 @@ public class MprisNowPlayingFragment extends Fragment implements VolumeKeyListen targetPlayer = mpris.getPlayerStatus(player); updatePlayerStatus(mpris); - if (targetPlayer.isPlaying()) { + if (targetPlayer != null && targetPlayer.isPlaying()) { MprisMediaSession.getInstance().playerSelected(targetPlayer); } }