[Bluetooth][Non-ACR] Fix svace issue (#2270) (#2278)
authorWootak Jung <wootak.jung@samsung.com>
Tue, 24 Nov 2020 01:57:39 +0000 (10:57 +0900)
committerGitHub <noreply@github.com>
Tue, 24 Nov 2020 01:57:39 +0000 (10:57 +0900)
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothGattImpl.cs

index 4e8f288..559a14b 100644 (file)
@@ -371,7 +371,10 @@ namespace Tizen.Network.Bluetooth
             }
 
             BluetoothGattCharacteristic Characteristic = BluetoothGattCharacteristicImpl.CreateBluetoothGattGattCharacteristic(attributeHandle, uuid);
-            Characteristic.SetParent(service);
+            if (Characteristic != null)
+            {
+                Characteristic.SetParent(service);
+            }
             return Characteristic;
         }
 
@@ -532,7 +535,10 @@ namespace Tizen.Network.Bluetooth
                 return null;
             }
             BluetoothGattDescriptor descriptor = BluetoothGattDescriptorImpl.CreateBluetoothGattDescriptor(handle, uuid);
-            descriptor.SetParent(characteristic);
+            if (descriptor != null)
+            {
+                descriptor.SetParent(characteristic);
+            }
             return descriptor;
         }