Bug 993954 - Check sBluetoothChild is null when closing Settings application

It is possible that sBluetoothChild set to nullptr and RecvNotify get called from MessageLoop.
This patch check sBluetoothChild.
This commit is contained in:
Shawn Huang 2014-04-30 16:58:15 +01:00
Родитель bed22124d3
Коммит 8e45b3c2ac
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -75,7 +75,9 @@ BluetoothChild::RecvNotify(const BluetoothSignal& aSignal)
{
MOZ_ASSERT(sBluetoothService);
if (sBluetoothService) {
sBluetoothService->DistributeSignal(aSignal);
}
return true;
}
@ -84,7 +86,9 @@ BluetoothChild::RecvEnabled(const bool& aEnabled)
{
MOZ_ASSERT(sBluetoothService);
if (sBluetoothService) {
sBluetoothService->SetEnabled(aEnabled);
}
return true;
}