Bug 351853, Crashes [@ nsFormFillController::GetDocShellForInput], adding a null check, r=dbaron

This commit is contained in:
Olli.Pettay%helsinki.fi 2006-09-08 21:19:58 +00:00
Родитель 7b3d89c5d5
Коммит 4b3a92d985
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -219,6 +219,7 @@ nsFormFillController::SetPopupOpen(PRBool aPopupOpen)
if (aPopupOpen) { if (aPopupOpen) {
// make sure input field is visible before showing popup (bug 320938) // make sure input field is visible before showing popup (bug 320938)
nsCOMPtr<nsIContent> content = do_QueryInterface(mFocusedInput); nsCOMPtr<nsIContent> content = do_QueryInterface(mFocusedInput);
NS_ENSURE_STATE(content);
nsCOMPtr<nsIDocShell> docShell = GetDocShellForInput(mFocusedInput); nsCOMPtr<nsIDocShell> docShell = GetDocShellForInput(mFocusedInput);
NS_ENSURE_STATE(docShell); NS_ENSURE_STATE(docShell);
nsCOMPtr<nsIPresShell> presShell; nsCOMPtr<nsIPresShell> presShell;