Make sure bluetoothreceiver is registered before unregistering it

This commit is contained in:
Juha Heinanen
2025-04-19 09:14:03 +03:00
parent 83ff6323b2
commit 1ffd69c9d4

View File

@ -1581,7 +1581,8 @@ class BaresipService: Service() {
private fun cleanService() {
if (!isServiceClean) {
this.unregisterReceiver(bluetoothReceiver)
if (btAdapter != null)
this.unregisterReceiver(bluetoothReceiver)
this.unregisterReceiver(hotSpotReceiver)
stopRinging()
stopMediaPlayer()