diff --git a/src/org/kde/kdeconnect/Plugins/FindMyPhonePlugin/FindMyPhonePlugin.java b/src/org/kde/kdeconnect/Plugins/FindMyPhonePlugin/FindMyPhonePlugin.java index 32064f2b..ba3fff95 100644 --- a/src/org/kde/kdeconnect/Plugins/FindMyPhonePlugin/FindMyPhonePlugin.java +++ b/src/org/kde/kdeconnect/Plugins/FindMyPhonePlugin/FindMyPhonePlugin.java @@ -188,6 +188,11 @@ public class FindMyPhonePlugin extends Plugin { } void stopPlaying() { + if (audioManager == null) { + // The Plugin was destroyed (probably the device disconnected) + return; + } + if (previousVolume != -1) { audioManager.setStreamVolume(AudioManager.STREAM_ALARM, previousVolume, 0); }