mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-02-17 21:06:48 +01:00
Avoided a NullPointerException when queue is null
This commit is contained in:
parent
cbc99b49ab
commit
116b2572dd
@ -188,12 +188,15 @@ public class WatchXPlusDeviceSupport extends AbstractBTLEDeviceSupport {
|
||||
*/
|
||||
private void cancelNotification() {
|
||||
try {
|
||||
if (getQueue() == null) {
|
||||
LOG.warn("Unable to cancel notification, queue is null");
|
||||
return;
|
||||
}
|
||||
getQueue().clear();
|
||||
TransactionBuilder builder = performInitialized("cancelNotification");
|
||||
byte[] bArr;
|
||||
int mPosition = 1024; // all positions
|
||||
int mMessageId = 0xFF; // all messages
|
||||
bArr = new byte[6];
|
||||
byte[] bArr = new byte[6];
|
||||
bArr[0] = (byte) ((int) (mPosition >> 24));
|
||||
bArr[1] = (byte) ((int) (mPosition >> 16));
|
||||
bArr[2] = (byte) ((int) (mPosition >> 8));
|
||||
|
Loading…
x
Reference in New Issue
Block a user