mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Fix logout crash.
This commit is contained in:
parent
1034c4db62
commit
505e2b4a4e
1 changed files with 4 additions and 1 deletions
|
@ -517,7 +517,10 @@ public class NBSyncService extends Service {
|
||||||
|
|
||||||
void decrementRunningChild(int startId) {
|
void decrementRunningChild(int startId) {
|
||||||
synchronized (WAKELOCK_MUTEX) {
|
synchronized (WAKELOCK_MUTEX) {
|
||||||
if (wl != null) wl.release();
|
if (wl == null) return;
|
||||||
|
if (wl.isHeld()) {
|
||||||
|
wl.release();
|
||||||
|
}
|
||||||
// our wakelock reference counts. only stop the service if it is in the background and if
|
// our wakelock reference counts. only stop the service if it is in the background and if
|
||||||
// we are the last thread to release the lock.
|
// we are the last thread to release the lock.
|
||||||
if (!wl.isHeld()) {
|
if (!wl.isHeld()) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue