From 9fd87a8636a75eaf401fa77ee9588a4a94085bd1 Mon Sep 17 00:00:00 2001 From: "mrbkap%gmail.com" Date: Thu, 9 Mar 2006 18:48:32 +0000 Subject: [PATCH] Don't crash on empty XUL files. bug 326204, r=neil, sr=bzbarsky --- content/xul/document/src/nsXULDocument.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/content/xul/document/src/nsXULDocument.cpp b/content/xul/document/src/nsXULDocument.cpp index 1ea473579c8..7335cb090ef 100644 --- a/content/xul/document/src/nsXULDocument.cpp +++ b/content/xul/document/src/nsXULDocument.cpp @@ -2949,7 +2949,9 @@ nsXULDocument::ResumeWalk() mDocumentLoaded = PR_TRUE; nsAutoString title; - GetRootContent()->GetAttr(kNameSpaceID_None, nsHTMLAtoms::title, title); + nsIContent *rootContent = GetRootContent(); + if (rootContent) + rootContent->GetAttr(kNameSpaceID_None, nsHTMLAtoms::title, title); SetTitle(title); StartLayout(); @@ -2964,7 +2966,6 @@ nsXULDocument::ResumeWalk() DispatchContentLoadedEvents(); - NS_ASSERTION(mPlaceHolderRequest, "Bug 119310, perhaps overlayinfo referenced a overlay that doesn't exist"); if (mPlaceHolderRequest) { // Remove the placeholder channel; if we're the last channel in the // load group, this will fire the OnEndDocumentLoad() method in the