Bug 862462 - Make sure BluetoothAdapter unroots before destruction; r=mrbkap

This commit is contained in:
Kyle Machulis 2013-04-16 14:54:00 -07:00
parent 82897862d8
commit e77f5f1a14

View File

@ -168,11 +168,11 @@ BluetoothAdapter::BluetoothAdapter(nsPIDOMWindow* aWindow,
BluetoothAdapter::~BluetoothAdapter()
{
Unroot();
BluetoothService* bs = BluetoothService::Get();
// We can be null on shutdown, where this might happen
NS_ENSURE_TRUE_VOID(bs);
bs->UnregisterBluetoothSignalHandler(NS_LITERAL_STRING(KEY_ADAPTER), this);
Unroot();
}
void