зеркало из https://github.com/mozilla/gecko-dev.git
Bug 725951 - Don't abort if mObservers is null when removing an observer from ObserversManager. r=jlebar
This commit is contained in:
Родитель
e15085320f
Коммит
4f23a6cd20
|
@ -178,7 +178,12 @@ public:
|
|||
}
|
||||
|
||||
void RemoveObserver(Observer<InfoType>* aObserver) {
|
||||
MOZ_ASSERT(mObservers);
|
||||
// If mObservers is null, that means there are no observers, so removing one
|
||||
// must be a no-op.
|
||||
if (!mObservers) {
|
||||
return;
|
||||
}
|
||||
|
||||
mObservers->RemoveObserver(aObserver);
|
||||
|
||||
if (mObservers->Length() == 0) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче