mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 20:07:30 +09:00
Issue #1514 - Perform validity check before trying to use the content.
Resolves #1514
This commit is contained in:
parent
788e24053a
commit
de71a9e013
1 changed files with 2 additions and 1 deletions
|
|
@ -333,8 +333,9 @@ HTMLEditor::SetInlinePropertyOnTextNode(Text& aText,
|
||||||
RefPtr<Text> text = &aText;
|
RefPtr<Text> text = &aText;
|
||||||
if (uint32_t(aEndOffset) != aText.Length()) {
|
if (uint32_t(aEndOffset) != aText.Length()) {
|
||||||
// We need to split off back of text node
|
// 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());
|
NS_ENSURE_TRUE(!rv.Failed(), rv.StealNSResult());
|
||||||
|
text = textNode->GetAsText();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aStartOffset) {
|
if (aStartOffset) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue