Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2633)

Unified Diff: device/bluetooth/bluez/bluetooth_service_attribute_value_bluez.cc

Issue 2284713002: device/bluetooth: Fix copy constructor of BluetoothServiceAttributeValueBlueZ (Closed)
Patch Set: device/bluetooth: Fix copy constructor of BluetoothServiceAttributeValueBlueZ Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluez/bluetooth_service_attribute_value_bluez.cc
diff --git a/device/bluetooth/bluez/bluetooth_service_attribute_value_bluez.cc b/device/bluetooth/bluez/bluetooth_service_attribute_value_bluez.cc
index c66b95332fe3353f5707f0139b34619c3c1e6ee4..e9d61a825018e8574970a589efaeb2b9759f2549 100644
--- a/device/bluetooth/bluez/bluetooth_service_attribute_value_bluez.cc
+++ b/device/bluetooth/bluez/bluetooth_service_attribute_value_bluez.cc
@@ -33,6 +33,11 @@ BluetoothServiceAttributeValueBlueZ::BluetoothServiceAttributeValueBlueZ(
this->type_ = attribute.type_;
this->size_ = attribute.size_;
+ if (attribute.type_ == NULLTYPE) {
+ this->value_ = base::Value::CreateNullValue();
+ return;
+ }
+
if (attribute.type_ != SEQUENCE) {
this->value_ = base::WrapUnique(attribute.value_->DeepCopy());
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698