mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 632342 - mSensor should be deleted on startup failure. r=blassey
This commit is contained in:
parent
6a2d061254
commit
fb4cf54bd7
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user