mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 02:14:43 +00:00
Bug 1555640 - Check if aPointAfterInsertedString
is nullptr when WSRunObject::InsertText()
sets its value r=m_kato
`aPointAfterInsertedString` of `WSRunObject::InsertText()` is optional (i.e., may be nullptr). However, the fix for bug 1534394 makes it always set to original insertion point when `InsertTextWithTransaction()` is failed. This patch just make it check if `aPointAfterInsertedString` is nullptr before setting its value. Differential Revision: https://phabricator.services.mozilla.com/D33144 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
89fcedf92d
commit
a3d946e313
@ -380,7 +380,9 @@ nsresult WSRunObject::InsertText(Document& aDocument,
|
||||
aPointAfterInsertedString);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
// XXX Temporarily, set new insertion point to the original point.
|
||||
*aPointAfterInsertedString = pointToInsert;
|
||||
if (aPointAfterInsertedString) {
|
||||
*aPointAfterInsertedString = pointToInsert;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user