Bug 632342 - mSensor should be deleted on startup failure. r=blassey

This commit is contained in:
Doug Turner 2011-07-17 13:01:05 -07:00
parent f8e0646ef5
commit 3a94e08884

View File

@ -147,8 +147,10 @@ void nsDeviceMotionSystem::Startup()
if (mSensor)
started = mSensor->Startup();
if (!started)
if (!started) {
mSensor = nsnull;
return;
}
mUpdateTimer = do_CreateInstance("@mozilla.org/timer;1");
if (mUpdateTimer)