Bug 1478605 - HTMLEditRules::SplitMailCites() should check if split left node has a primary frame before accessing it r=jorgk+176914

The crash at this point may be caused by unexpected behavior change.  However,
it's difficult to investigate what causes the crash.  So, let's just avoid
the crash to investigate what unexpected behavior occurs.

MozReview-Commit-ID: P6YZTqP7zI

--HG--
extra : rebase_source : 24620884511aa3f1bc9fddb6049fcf6554150439
This commit is contained in:
Masayuki Nakano 2018-07-26 19:38:33 +09:00
parent 835840ac99
commit b590219ca3

View File

@ -2182,6 +2182,7 @@ HTMLEditRules::SplitMailCites(bool* aHandled)
splitCiteNodeResult.GetPreviousNode();
if (previousNodeOfSplitPoint &&
previousNodeOfSplitPoint->IsHTMLElement(nsGkAtoms::span) &&
previousNodeOfSplitPoint->GetPrimaryFrame() &&
previousNodeOfSplitPoint->GetPrimaryFrame()->
IsFrameOfType(nsIFrame::eBlockFrame)) {
nsCOMPtr<nsINode> lastChild =