Merge pull request #1746 from lee-b/feature/silent_mode

Fix potential NPE in AlarmSoundService destructor.
This commit is contained in:
Milos Kozak 2019-04-16 20:03:19 +02:00 committed by GitHub
commit 88031b2322
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -75,8 +75,11 @@ public class AlarmSoundService extends Service {
@Override @Override
public void onDestroy() { public void onDestroy() {
player.stop(); if (player != null) {
player.release(); player.stop();
player.release();
}
if (L.isEnabled(L.CORE)) if (L.isEnabled(L.CORE))
log.debug("onDestroy"); log.debug("onDestroy");
} }