diff --git a/mozilla/content/html/style/src/nsHTMLAttributes.cpp b/mozilla/content/html/style/src/nsHTMLAttributes.cpp index a476b85bcef..9aa14ca6a5d 100644 --- a/mozilla/content/html/style/src/nsHTMLAttributes.cpp +++ b/mozilla/content/html/style/src/nsHTMLAttributes.cpp @@ -177,6 +177,7 @@ struct nsClassList { : mAtom(aCopy.mAtom), mNext(nsnull) { + NS_ADDREF(mAtom); if (nsnull != aCopy.mNext) { mNext = new nsClassList(*(aCopy.mNext)); } diff --git a/mozilla/layout/html/style/src/nsHTMLAttributes.cpp b/mozilla/layout/html/style/src/nsHTMLAttributes.cpp index a476b85bcef..9aa14ca6a5d 100644 --- a/mozilla/layout/html/style/src/nsHTMLAttributes.cpp +++ b/mozilla/layout/html/style/src/nsHTMLAttributes.cpp @@ -177,6 +177,7 @@ struct nsClassList { : mAtom(aCopy.mAtom), mNext(nsnull) { + NS_ADDREF(mAtom); if (nsnull != aCopy.mNext) { mNext = new nsClassList(*(aCopy.mNext)); }