1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-28 21:06:50 +01:00

Avoid potential NPE

This commit is contained in:
cpfeiffer 2018-08-17 00:19:10 +02:00
parent 0b63fa1c59
commit f96b10cca0

View File

@ -769,7 +769,7 @@ public class HuamiSupport extends AbstractBTLEDeviceSupport {
if (characteristicChunked == null) {
return;
}
if (bufferMusicSpec == null && bufferMusicStateSpec == null) {
if (bufferMusicSpec == null || bufferMusicStateSpec == null) {
try {
TransactionBuilder builder = performInitialized("send dummy playback info to enable music controls");
writeToChunked(builder, 3, new byte[]{1, 0, 1, 0, 0, 0, 1, 0});