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 cd863fb01e
commit 2c7e823a5b

View File

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