Skip to content

Commit a9d1941

Browse files
committed
Changed the code that checks for the wearable delay to look for a null before comparison to avoid crashes
1 parent cf5fec4 commit a9d1941

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/android/Peripheral.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ private void processCommands() {
621621
int delay = 0;
622622

623623
// 4/18/17 - NVF Added for delay for wearable writes
624-
if (command.getData()[0]==0x6f) {
624+
if (command.getData()!=null && command.getData()[0]==0x6f) {
625625
delay = (command.getType() == BluetoothGattCharacteristic.WRITE_TYPE_DEFAULT)?2000:0;
626626

627627
}

0 commit comments

Comments
 (0)