Bug 372247, crash simulating key events on a window with no frame, r+sr=roc

git-svn-id: svn://10.0.0.236/trunk@221194 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
enndeakin%sympatico.ca
2007-03-02 03:57:16 +00:00
parent 822f9d552e
commit f96b54237b

View File

@@ -261,8 +261,11 @@ nsDOMWindowUtils::GetWidget()
if (docShell) {
nsCOMPtr<nsIPresShell> presShell;
docShell->GetPresShell(getter_AddRefs(presShell));
if (presShell)
return presShell->GetRootFrame()->GetWindow();
if (presShell) {
nsIFrame* frame = presShell->GetRootFrame();
if (frame)
return frame->GetWindow();
}
}
}