[Bluetooth] Added checking for null data 26/243826/1 accepted/tizen/unified/20200911.143315 submit/tizen/20200911.055107
authorPiotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
Thu, 10 Sep 2020 09:10:18 +0000 (11:10 +0200)
committerPiotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
Thu, 10 Sep 2020 09:56:51 +0000 (11:56 +0200)
[Verification] BT auto 100%
Manual test BluetoothSocket - subtest BluetoothSocket_writeData_misarg fixed.

Change-Id: I44f27a5f5bee1dae73017ce736709b4c464471c2

src/bluetooth/bluetooth_api.js

index d030dca..0564ba6 100755 (executable)
@@ -3598,7 +3598,7 @@ var BluetoothManager_byteArrayToHexString = function(bytes) {
 }
 
 var BluetoothManager_toByteArray = function(data) {
-    if (String === data.constructor) {
+    if (data && String === data.constructor) {
         return numberArrayToByteArray(BluetoothManager_HexStringToUint8Array(data));
     } else {
         try {