mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 282097 - Part 10: Ensure input commands are enabled. r=enndeakin
This commit is contained in:
parent
8dd81455a4
commit
ce023dcc05
@ -794,7 +794,14 @@ DoCommandCallback(const char *aCommand, void *aData)
|
||||
|
||||
nsCOMPtr<nsIController> controller;
|
||||
controllers->GetControllerForCommand(aCommand, getter_AddRefs(controller));
|
||||
if (controller) {
|
||||
if (!controller) {
|
||||
return;
|
||||
}
|
||||
|
||||
bool commandEnabled;
|
||||
nsresult rv = controller->IsCommandEnabled(aCommand, &commandEnabled);
|
||||
NS_ENSURE_SUCCESS_VOID(rv);
|
||||
if (commandEnabled) {
|
||||
controller->DoCommand(aCommand);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user