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() {
|
||||||
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");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue