diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-13 12:57:07 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-13 12:57:07 +0200 |
commit | a9abac43f1d2c7c25a0b32d5c303d498812918fa (patch) | |
tree | 1549b36fbd5433d3e0d837bdc27a683b298c4eaf /editor | |
parent | d7ec0143e3adf531547581ca64f8be9afba560bf (diff) | |
download | aura-central-a9abac43f1d2c7c25a0b32d5c303d498812918fa.tar.gz |
Issue mcp-graveyard/UXP%1514 - Perform validity check before trying to use the content.
Resolves %1514
Diffstat (limited to 'editor')
-rw-r--r-- | editor/libeditor/HTMLStyleEditor.cpp | 3 |
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) { |