mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
bug 980876 - null check GamepadService in case of events still in play during shutdown. r=smaug
This commit is contained in:
parent
ec6a7031f0
commit
bddbb12352
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user