check that locks are held before trying to release them

This commit is contained in:
Juha Heinanen
2018-06-23 17:05:40 +03:00
parent a1e4791359
commit 8fd0605498

View File

@ -144,8 +144,8 @@ class BaresipService: Service() {
BaresipService.IS_SERVICE_RUNNING = false
unregisterReceiver(nr)
nm.cancelAll()
wl.release()
fl.release()
if (wl.isHeld) wl.release()
if (fl.isHeld) fl.release()
stopForeground(true)
stopSelf()
}