mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 23:08:39 +09:00
editor: check selection->GetAnchorFocusRange() before using its functions
this fixes crash when clicking Quote Message twice.
This commit is contained in:
parent
22356686f9
commit
082405259b
1 changed files with 1 additions and 1 deletions
|
|
@ -4201,7 +4201,7 @@ EditorBase::DeleteSelectionAndPrepareToCreateNode()
|
|||
NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
|
||||
MOZ_ASSERT(selection->GetAnchorFocusRange());
|
||||
|
||||
if (!selection->GetAnchorFocusRange()->Collapsed()) {
|
||||
if (selection->GetAnchorFocusRange() && !selection->GetAnchorFocusRange()->Collapsed()) {
|
||||
nsresult rv = DeleteSelection(nsIEditor::eNone, nsIEditor::eStrip);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue