diff --git a/accessible/src/html/nsHyperTextAccessible.cpp b/accessible/src/html/nsHyperTextAccessible.cpp
index 91c4aeb0790b..65c558d6db5a 100644
--- a/accessible/src/html/nsHyperTextAccessible.cpp
+++ b/accessible/src/html/nsHyperTextAccessible.cpp
@@ -1653,7 +1653,7 @@ PRInt32 nsHyperTextAccessible::GetCaretLineNumber()
PRInt32 lineNumber = 1;
nsAutoLineIterator lineIterForCaret;
- nsIContent *hyperTextContent = IsContent() ? mContent : nsnull;
+ nsIContent *hyperTextContent = IsContent() ? mContent.get() : nsnull;
while (caretFrame) {
if (hyperTextContent == caretFrame->GetContent()) {
return lineNumber; // Must be in a single line hyper text, there is no line iterator