зеркало из https://github.com/mozilla/gecko-dev.git
Bug 949004 - Check to see if lock is null before using it. r=qDot
--HG-- extra : rebase_source : 115a50601853376ae1a0548aad4d61f58e96c8d1
This commit is contained in:
Родитель
9a299e00ab
Коммит
22cb4e6756
|
@ -191,7 +191,10 @@ public:
|
|||
NS_ENSURE_TRUE(settingsService, NS_ERROR_FAILURE);
|
||||
nsCOMPtr<nsISettingsServiceLock> lock;
|
||||
settingsService->CreateLock(getter_AddRefs(lock));
|
||||
lock->Set(UMS_STATUS, INT_TO_JSVAL(mStatus), nullptr, nullptr);
|
||||
// lock may be null if this gets called during shutdown.
|
||||
if (lock) {
|
||||
lock->Set(UMS_STATUS, INT_TO_JSVAL(mStatus), nullptr, nullptr);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче