bug 980876 - null check GamepadService in case of events still in play during shutdown. r=smaug

This commit is contained in:
Ted Mielczarek 2014-04-07 14:28:41 -04:00
parent ec6a7031f0
commit bddbb12352

View File

@ -258,6 +258,9 @@ public:
NS_IMETHOD Run() {
nsRefPtr<GamepadService> gamepadsvc(GamepadService::GetService());
if (!gamepadsvc) {
return NS_OK;
}
switch (mType) {
case Button:
@ -320,6 +323,9 @@ public:
NS_IMETHOD Run() {
nsRefPtr<GamepadService> gamepadsvc(GamepadService::GetService());
if (!gamepadsvc) {
return NS_OK;
}
if (mType == Added) {
int globalID = gamepadsvc->AddGamepad(mName.get(),
mozilla::dom::NoMapping,