Bug 927201 - Add null check before trying to close observer service. r=mrbkap

This commit is contained in:
Gregor Wagner 2013-10-16 08:12:16 -04:00
parent ee28fb74fe
commit 7bce2f0001

View File

@ -66,7 +66,9 @@ nsDOMCameraManager::~nsDOMCameraManager()
/* destructor code */ /* destructor code */
DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this); DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
nsCOMPtr<nsIObserverService> obs = services::GetObserverService(); nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
obs->RemoveObserver(this, "xpcom-shutdown"); if (obs) {
obs->RemoveObserver(this, "xpcom-shutdown");
}
} }
bool bool