Fix potential NPE in AlarmSoundService destructor.
This commit is contained in:
parent
76932d6899
commit
78f2da405f
|
@ -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