From 1aa9f07f1bedb01c529fd14e4ee138b4c9cdc7a2 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 0eb4164414c5..a1d141b5206d 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 0eb4164414c5..a1d141b5206d 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); }