mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 980876 - null check GamepadService in case of events still in play during shutdown. r=smaug
This commit is contained in:
parent
25006fde09
commit
99e2065137
@ -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