Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
}
BluetoothGattCharacteristic Characteristic = BluetoothGattCharacteristicImpl.CreateBluetoothGattGattCharacteristic(attributeHandle, uuid);
- Characteristic.SetParent(service);
+ if (Characteristic != null)
+ {
+ Characteristic.SetParent(service);
+ }
return Characteristic;
}
return null;
}
BluetoothGattDescriptor descriptor = BluetoothGattDescriptorImpl.CreateBluetoothGattDescriptor(handle, uuid);
- descriptor.SetParent(characteristic);
+ if (descriptor != null)
+ {
+ descriptor.SetParent(characteristic);
+ }
return descriptor;
}