Bug 1374625 - Null-check result from GetTextRun in nsRubyBaseContainerFrame. r=jfkthame

MozReview-Commit-ID: CfXYCJ7wpj

--HG--
extra : rebase_source : 3a5040e597ac2a1ac714eb5e1f5da60fdc9b4115
This commit is contained in:
Xidorn Quan 2017-06-20 23:00:26 +10:00
parent aacce3e3bb
commit e98d75a60e

View File

@ -79,7 +79,8 @@ LineBreakBefore(nsIFrame* aFrame,
iter.SetOriginalOffset(textFrame->GetContentOffset());
uint32_t pos = iter.GetSkippedOffset();
gfxTextRun* textRun = textFrame->GetTextRun(nsTextFrame::eInflated);
if (pos >= textRun->GetLength()) {
MOZ_ASSERT(textRun, "fail to build textrun?");
if (!textRun || pos >= textRun->GetLength()) {
// The text frame contains no character at all.
return gfxBreakPriority::eNoBreak;
}