From 8fd48c91ce73cf4b4841caa2ee1e697dbf3c71da Mon Sep 17 00:00:00 2001 From: "pinkerton%netscape.com" Date: Mon, 16 Jul 2001 22:16:10 +0000 Subject: [PATCH] nullcheck document to prevent crash when there isn't a document. r=saari/sr=hyatt. bug#89373 git-svn-id: svn://10.0.0.236/trunk@99346 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/xul/base/src/nsPopupSetFrame.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mozilla/layout/xul/base/src/nsPopupSetFrame.cpp b/mozilla/layout/xul/base/src/nsPopupSetFrame.cpp index ffe575a73fd..6db0ac501df 100644 --- a/mozilla/layout/xul/base/src/nsPopupSetFrame.cpp +++ b/mozilla/layout/xul/base/src/nsPopupSetFrame.cpp @@ -609,7 +609,8 @@ nsPopupSetFrame::ActivatePopup(PRBool aActivateFlag) // reflow will cause the popup to show itself again. (bug 71219) nsCOMPtr doc; content->GetDocument(*getter_AddRefs(doc)); - doc->FlushPendingNotifications(); + if ( doc ) + doc->FlushPendingNotifications(); // make sure we hide the popup. We can't assume that we'll have a view // since we could be cleaning up after someone that didn't correctly