summaryrefslogtreecommitdiff
path: root/editor/libeditor/TextEditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/libeditor/TextEditor.cpp')
-rw-r--r--editor/libeditor/TextEditor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/libeditor/TextEditor.cpp b/editor/libeditor/TextEditor.cpp
index 35ea5da831..9d07c198b4 100644
--- a/editor/libeditor/TextEditor.cpp
+++ b/editor/libeditor/TextEditor.cpp
@@ -1237,7 +1237,7 @@ TextEditor::GetAndInitDocEncoder(const nsAString& aFormatType,
nsCOMPtr<nsIDocumentEncoder> docEncoder (do_CreateInstance(formatType.get(), &rv));
NS_ENSURE_SUCCESS(rv, rv);
- nsCOMPtr<nsIDOMDocument> domDoc = do_QueryReferent(mDocWeak);
+ nsCOMPtr<nsIDOMDocument> domDoc = GetDOMDocument();
NS_ASSERTION(domDoc, "Need a document");
rv = docEncoder->Init(domDoc, aFormatType, aFlags);