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

This commit is contained in:
Doug Turner 2011-07-16 22:15:30 -07:00
parent 6a2d061254
commit fb4cf54bd7

View File

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