Bug 790503 - On Mac Mini, defaultCalibration reads outside of sensors[]. r=jruderman@gmail.com,blassey

This commit is contained in:
Doug Turner 2012-10-01 20:45:32 -07:00
parent 4c4ba5d4bd
commit 8b81f97143

View File

@ -41,8 +41,14 @@ EnableSensorNotifications(SensorType aSensor)
if (sUpdateTimer)
return;
smsStartup(nil, nil);
smsLoadCalibration();
int result = smsStartup(nil, nil);
if (result != SMS_SUCCESS) {
return;
}
if (!smsLoadCalibration()) {
return;
}
CallCreateInstance("@mozilla.org/timer;1", &sUpdateTimer);
if (sUpdateTimer)