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

git-svn-id: svn://10.0.0.236/trunk@176657 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
smfr%smfr.org
2005-07-27 02:16:47 +00:00
parent 756427e361
commit 304da1f929

View File

@@ -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));