Skip to content

Commit bdbaca5

Browse files
biii-techbiii-anuj-pathak
authored andcommitted
restoring null checks
1 parent 855c856 commit bdbaca5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/reactive_ble_mobile/android/src/main/kotlin/com/signify/hue/flutterreactiveble/converters/ManufacturerDataConverter.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ package com.signify.hue.flutterreactiveble.converters
22

33
import android.util.SparseArray
44

5-
fun extractManufacturerData(manufacturerData: SparseArray<ByteArray>): ByteArray {
5+
fun extractManufacturerData(manufacturerData: SparseArray<ByteArray>?): ByteArray {
66
val rawData = mutableListOf<Byte>()
77

8-
if (manufacturerData.size() > 0) {
8+
if (manufacturerData != null && manufacturerData.size() > 0) {
99
val companyId = manufacturerData.keyAt(0)
1010
rawData.add((companyId.toByte()))
1111
rawData.add(((companyId.shr(Byte.SIZE_BITS)).toByte()))

0 commit comments

Comments
 (0)