From 6379679e2b0d29138e2d3cf87b5d1d61baf4332c Mon Sep 17 00:00:00 2001 From: Albert Vaca Cintora Date: Sat, 7 Oct 2023 00:35:43 +0200 Subject: [PATCH] Small change to isolate NPE We have NPE reports from the line mpris.fetchedAlbumArt(url.toString()). I'm not sure if it's because mpris is null or url is null. Spliting in two lines to see where the crash actually happens. --- src/org/kde/kdeconnect/Plugins/MprisPlugin/AlbumArtCache.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/org/kde/kdeconnect/Plugins/MprisPlugin/AlbumArtCache.kt b/src/org/kde/kdeconnect/Plugins/MprisPlugin/AlbumArtCache.kt index bde18c71..d5e102e8 100644 --- a/src/org/kde/kdeconnect/Plugins/MprisPlugin/AlbumArtCache.kt +++ b/src/org/kde/kdeconnect/Plugins/MprisPlugin/AlbumArtCache.kt @@ -384,7 +384,8 @@ internal object AlbumArtCache { //So notify the mpris plugins of the fetched art for (mpris in registeredPlugins) { - mpris.fetchedAlbumArt(url.toString()) + val stringUrl = url.toString() + mpris.fetchedAlbumArt(stringUrl) } } else { //Mark the fetch as failed in the memory cache