Fixing the crash reported in bugscape bug 4922. Adding null check on domWindow to break from the HandleEvent routine. r=saari

git-svn-id: svn://10.0.0.236/trunk@94525 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
racham%netscape.com 2001-05-10 23:13:27 +00:00
parent 9438c0cf7c
commit a5f116f8af

View File

@ -502,6 +502,9 @@ nsWebShellWindow::HandleEvent(nsGUIEvent *aEvent)
nsCOMPtr<nsIDOMWindowInternal> domWindow;
eventWindow->ConvertWebShellToDOMWindow(webShell, getter_AddRefs(domWindow));
nsCOMPtr<nsPIDOMWindow> piWin(do_QueryInterface(domWindow));
if (!domWindow) {
break;
}
nsCOMPtr<nsIFocusController> focusController;
piWin->GetRootFocusController(getter_AddRefs(focusController));
if (focusController) {