aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-01-30 19:41:14 +0100
committerChristian Schneppe <christian@pix-art.de>2018-01-30 19:41:14 +0100
commit7a67de94628dfe12b8790c333e5c5c19e647caab (patch)
tree7f7de661835f03a1d655555d962e66349bf640c0
parentae72001c454b9a903e34a9521ca4bac316a90535 (diff)
check if wakelock is held before releasing
-rw-r--r--src/main/java/de/pixart/messenger/http/HttpUploadConnection.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/http/HttpUploadConnection.java b/src/main/java/de/pixart/messenger/http/HttpUploadConnection.java
index 36c6b293f..e2dd6930c 100644
--- a/src/main/java/de/pixart/messenger/http/HttpUploadConnection.java
+++ b/src/main/java/de/pixart/messenger/http/HttpUploadConnection.java
@@ -229,7 +229,9 @@ public class HttpUploadConnection implements Transferable {
if (connection != null) {
connection.disconnect();
}
- wakeLock.release();
+ if (wakeLock.isHeld()) {
+ wakeLock.release();
+ }
}
}
}