Don't crash if the focus controller is null during a deactivate (bug 168454). r=hewitt, sr=jst.

This commit is contained in:
bryner%netscape.com 2002-10-01 01:25:00 +00:00
parent 3ba4db53e3
commit e3d321d3b9

View File

@ -746,7 +746,8 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext,
nsCOMPtr<nsIPresShell> shell;
nsCOMPtr<nsIDOMElement> focusedElement;
focusController->GetFocusedElement(getter_AddRefs(focusedElement));
if (focusController)
focusController->GetFocusedElement(getter_AddRefs(focusedElement));
nsCOMPtr<nsIContent> focusedContent = do_QueryInterface(focusedElement);
gLastFocusedDocument->GetShellAt(0, getter_AddRefs(shell));