From bb3aac94b5e02b3f9cced48ade55b57e601fdacb Mon Sep 17 00:00:00 2001 From: "vidur%netscape.com" Date: Sat, 12 Jun 1999 00:37:36 +0000 Subject: [PATCH] Fix for bug 6785. Incorrect reinitializing of mData. --- content/base/src/nsContentList.cpp | 4 +++- layout/base/src/nsContentList.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/content/base/src/nsContentList.cpp b/content/base/src/nsContentList.cpp index 0eb4164414c..a1d141b5206 100644 --- a/content/base/src/nsContentList.cpp +++ b/content/base/src/nsContentList.cpp @@ -74,10 +74,12 @@ nsContentList::nsContentList(nsIDocument *aDocument, mData = new nsString(*aData); // If this fails, fail silently } + else { + mData = nsnull; + } mMatchAtom = nsnull; mRootContent = aRootContent; mMatchAll = PR_FALSE; - mData = nsnull; Init(aDocument); } diff --git a/layout/base/src/nsContentList.cpp b/layout/base/src/nsContentList.cpp index 0eb4164414c..a1d141b5206 100644 --- a/layout/base/src/nsContentList.cpp +++ b/layout/base/src/nsContentList.cpp @@ -74,10 +74,12 @@ nsContentList::nsContentList(nsIDocument *aDocument, mData = new nsString(*aData); // If this fails, fail silently } + else { + mData = nsnull; + } mMatchAtom = nsnull; mRootContent = aRootContent; mMatchAll = PR_FALSE; - mData = nsnull; Init(aDocument); }