Fixing StartLayout so that it asserts and leaves the function if no root

content is available.
This commit is contained in:
hyatt%netscape.com 1999-07-01 07:34:19 +00:00
parent 93ec012618
commit fa48a0b102
2 changed files with 8 additions and 0 deletions

View File

@ -3943,6 +3943,10 @@ XULDocumentImpl::Init(void)
nsresult
XULDocumentImpl::StartLayout(void)
{
NS_ASSERTION(mRootContent != nsnull, "Error in XUL file. Love to tell ya where if only I knew.");
if (!mRootContent)
return NS_ERROR_UNEXPECTED;
if (mFragmentRoot)
return NS_OK; // Subdocuments rely on the parent document for layout

View File

@ -3943,6 +3943,10 @@ XULDocumentImpl::Init(void)
nsresult
XULDocumentImpl::StartLayout(void)
{
NS_ASSERTION(mRootContent != nsnull, "Error in XUL file. Love to tell ya where if only I knew.");
if (!mRootContent)
return NS_ERROR_UNEXPECTED;
if (mFragmentRoot)
return NS_OK; // Subdocuments rely on the parent document for layout