[Bluetooth][Non-ACR] Fix unhandled exception in GetBondedDevice() (#2514) (#3216)
authorWootak Jung <wootak.jung@samsung.com>
Tue, 22 Jun 2021 00:02:45 +0000 (09:02 +0900)
committerGitHub <noreply@github.com>
Tue, 22 Jun 2021 00:02:45 +0000 (09:02 +0900)
commite6cb3925a5575b0d6a3da005485f35eec146ed11
treeb5158615f46ed27a3c02a273923f823472067af8
parent223abc2813d2c9a972b435fded8e7a574be24d9c
[Bluetooth][Non-ACR] Fix unhandled exception in GetBondedDevice() (#2514) (#3216)

Device is not bonded : System.NullReferenceException: Object reference not set to an instance of an object.
    at System.SpanHelpers.IndexOf(Byte& searchSpace, Byte value, Int32 length)
    at System.String.Ctor(SByte* value)
    at System.Runtime.InteropServices.Marshal.PtrToStringAnsi(IntPtr ptr)
    at Tizen.Network.Bluetooth.BluetoothUtils.ConvertStructToDeviceClass(BluetoothDeviceStruct device)
    at Tizen.Network.Bluetooth.BluetoothAdapterImpl.GetBondedDevice(String address)
    at Tizen.Network.Bluetooth.BluetoothAdapter.GetBondedDevice(String address)

Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
Co-authored-by: dh79pyun <31202060+dh79pyun@users.noreply.github.com>
src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothStructs.cs