mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
Bug 1127835 - part 1, Add a null-check to avoid fatal assertion if the split results in no left part. r=smaug
This commit is contained in:
parent
962798c52c
commit
5818444d89
@ -710,8 +710,10 @@ nsHTMLEditor::DoInsertHTMLWithContext(const nsAString & aInputString,
|
||||
int32_t linkOffset;
|
||||
rv = SplitNodeDeep(link, selNode, selOffset, &linkOffset, true, address_of(leftLink));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
selNode = GetNodeLocation(leftLink, &selOffset);
|
||||
selection->Collapse(selNode, selOffset+1);
|
||||
if (leftLink) {
|
||||
selNode = GetNodeLocation(leftLink, &selOffset);
|
||||
selection->Collapse(selNode, selOffset+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user