зеркало из https://github.com/mozilla/gecko-dev.git
Bug 506637 nsFocusController::GetControllers does not handle a null nsIFocusManager* fm well
r=smaug
This commit is contained in:
Родитель
0fcff0c86c
Коммит
5a625c1127
|
@ -98,9 +98,12 @@ nsFocusController::GetControllers(nsIControllers** aResult)
|
|||
// knowledge of what object might have controllers.
|
||||
nsCOMPtr<nsIDOMElement> focusedElement;
|
||||
nsIFocusManager* fm = nsFocusManager::GetFocusManager();
|
||||
if (fm)
|
||||
fm->GetFocusedElement(getter_AddRefs(focusedElement));
|
||||
if (!fm) {
|
||||
*aResult = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
fm->GetFocusedElement(getter_AddRefs(focusedElement));
|
||||
if (focusedElement) {
|
||||
#ifdef MOZ_XUL
|
||||
nsCOMPtr<nsIDOMXULElement> xulElement(do_QueryInterface(focusedElement));
|
||||
|
|
Загрузка…
Ссылка в новой задаче