bulletproofing. r=alecf. see bug #26608

This commit is contained in:
sspitzer%netscape.com 2000-02-04 22:37:11 +00:00
parent 83547ed348
commit dff03d383f

View File

@ -2176,7 +2176,7 @@ PRBool nsWebShellWindow::ExecuteCloseHandler()
nsCOMPtr<nsIDocumentViewer> docViewer;
nsCOMPtr<nsIPresContext> presContext;
docViewer = do_QueryInterface(contentViewer);
if (NS_SUCCEEDED(docViewer->GetPresContext(*getter_AddRefs(presContext)))) {
if (docViewer && NS_SUCCEEDED(docViewer->GetPresContext(*getter_AddRefs(presContext)))) {
nsEventStatus status = nsEventStatus_eIgnore;
nsMouseEvent event;
event.eventStructType = NS_EVENT;