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); }