From: Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics
Date: Thu, 10 Sep 2020 09:10:18 +0000 (+0200)
Subject: [Bluetooth] Added checking for null data
X-Git-Tag: submit/tizen/20200911.055107^0
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cfba5a973ff39512b360aa3a912e88e37357b857;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git
[Bluetooth] Added checking for null data
[Verification] BT auto 100%
Manual test BluetoothSocket - subtest BluetoothSocket_writeData_misarg fixed.
Change-Id: I44f27a5f5bee1dae73017ce736709b4c464471c2
---
diff --git a/src/bluetooth/bluetooth_api.js b/src/bluetooth/bluetooth_api.js
index d030dca6..0564ba6c 100755
--- a/src/bluetooth/bluetooth_api.js
+++ b/src/bluetooth/bluetooth_api.js
@@ -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 {