summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--editor/libeditor/HTMLStyleEditor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/libeditor/HTMLStyleEditor.cpp b/editor/libeditor/HTMLStyleEditor.cpp
index bc7141ad3..6a1ffe8b4 100644
--- a/editor/libeditor/HTMLStyleEditor.cpp
+++ b/editor/libeditor/HTMLStyleEditor.cpp
@@ -333,8 +333,9 @@ HTMLEditor::SetInlinePropertyOnTextNode(Text& aText,
RefPtr<Text> text = &aText;
if (uint32_t(aEndOffset) != aText.Length()) {
// We need to split off back of text node
- text = SplitNode(aText, aEndOffset, rv)->GetAsText();
+ nsIContent* textNode = SplitNode(aText, aEndOffset, rv);
NS_ENSURE_TRUE(!rv.Failed(), rv.StealNSResult());
+ text = textNode->GetAsText();
}
if (aStartOffset) {