Merge pull request #1746 from lee-b/feature/silent_mode
Fix potential NPE in AlarmSoundService destructor.
This commit is contained in:
commit
88031b2322
1 changed files with 5 additions and 2 deletions
|
@ -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");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue