diff --git a/mozilla/content/base/src/nsGenericElement.cpp b/mozilla/content/base/src/nsGenericElement.cpp index fa473e8fbb6..2656673f932 100644 --- a/mozilla/content/base/src/nsGenericElement.cpp +++ b/mozilla/content/base/src/nsGenericElement.cpp @@ -215,7 +215,7 @@ nsNode3Tearoff::GetTextContent(nsAString &aTextContent) return node->GetNodeValue(aTextContent); } - nsIDocument *doc = mContent->GetDocument(); + nsIDocument *doc = mContent->GetOwnerDoc(); if (!doc) { NS_ERROR("Need a document to do text serialization");