From c231ddb423174771b3a8a115101c7ec52a781bc1 Mon Sep 17 00:00:00 2001 From: Shawn Huang Date: Thu, 16 Jan 2014 14:36:35 +0800 Subject: [PATCH] Bug 950220 - Unable to change Bluetooth device name from Settings UI, r=echou --- dom/bluetooth/bluez/linux/BluetoothDBusService.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dom/bluetooth/bluez/linux/BluetoothDBusService.cpp b/dom/bluetooth/bluez/linux/BluetoothDBusService.cpp index 655368c0e67..a73b8ba15c6 100644 --- a/dom/bluetooth/bluez/linux/BluetoothDBusService.cpp +++ b/dom/bluetooth/bluez/linux/BluetoothDBusService.cpp @@ -2370,6 +2370,7 @@ BluetoothDBusService::SetProperty(BluetoothObjectType aType, int type; int tmp_int; void* val; + const char* tempStr; nsCString str; if (aValue.value().type() == BluetoothValue::Tuint32_t) { tmp_int = aValue.value().get_uint32_t(); @@ -2377,7 +2378,7 @@ BluetoothDBusService::SetProperty(BluetoothObjectType aType, type = DBUS_TYPE_UINT32; } else if (aValue.value().type() == BluetoothValue::TnsString) { str = NS_ConvertUTF16toUTF8(aValue.value().get_nsString()); - const char* tempStr = str.get(); + tempStr = str.get(); val = &tempStr; type = DBUS_TYPE_STRING; } else if (aValue.value().type() == BluetoothValue::Tbool) {