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 84ab5686cf
commit 016e475fbb

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)