Fix potential NPE in AlarmSoundService destructor.

This commit is contained in:
Lee Braiden 2019-04-15 19:09:56 +01:00
parent 76932d6899
commit 78f2da405f

View file

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