Hopefully fix bug 302195: add null check on the nsIDOMWindow so that when showing a cookie for an image, we don't crash.

This commit is contained in:
smfr%smfr.org 2005-07-27 02:16:47 +00:00
Родитель d8abad75e4
Коммит f3dc0bc953
1 изменённых файлов: 3 добавлений и 0 удалений

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

@ -137,6 +137,9 @@ const char kDirServiceContractID[] = "@mozilla.org/file/directory_service;1";
+ (CHBrowserView*)browserViewFromDOMWindow:(nsIDOMWindow*)inWindow
{
if (!inWindow)
return nil;
// make sure we get the root window (e.g. for subframes in frameset)
nsCOMPtr<nsIDOMWindow> topWindow;
inWindow->GetTop(getter_AddRefs(topWindow));