зеркало из 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:
Родитель
b3cc53bd9a
Коммит
ca7e35591f
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче