2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-31 14:15:14 +00:00

Add a null check as mentioned in !377

This commit is contained in:
Albert Vaca Cintora
2023-07-08 00:02:53 +02:00
parent d9db7e4ad9
commit ea80000a4e

View File

@@ -216,7 +216,7 @@ public class MprisMediaSession implements
}
private MprisPlugin.MprisPlayer getPlayerFromDevice(Device device, MprisPlugin.MprisPlayer preferredPlayer) {
if (!mprisDevices.contains(device.getDeviceId()))
if (device == null || !mprisDevices.contains(device.getDeviceId()))
return null;
MprisPlugin plugin = device.getPlugin(MprisPlugin.class);