Protect against a null docshell being passed in to GetIndexOfDocShell (bug 264032). r=mconnor.

This commit is contained in:
bryner%brianryner.com 2005-04-11 22:25:09 +00:00
Родитель 8bb695bed4
Коммит b3acbbd54e
1 изменённых файлов: 3 добавлений и 1 удалений

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

@ -1066,6 +1066,9 @@ nsFormFillController::GetWindowForDocShell(nsIDocShell *aDocShell)
PRInt32
nsFormFillController::GetIndexOfDocShell(nsIDocShell *aDocShell)
{
if (!aDocShell)
return -1;
// Loop through our cached docShells looking for the given docShell
PRUint32 count;
mDocShells->Count(&count);
@ -1087,4 +1090,3 @@ nsFormFillController::GetIndexOfDocShell(nsIDocShell *aDocShell)
return -1;
}