Bug 1429215: Null-check pointer before using it in assertion in GetFloatFromPlaceholder() (to avoid crashing during assertion). r=mats

MozReview-Commit-ID: 7pWq8nr1mqQ

--HG--
extra : rebase_source : c4cb90d7f865a3ab52889b53695f94f3e4157298
This commit is contained in:
Daniel Holbert 2018-01-09 12:54:21 -08:00
Родитель 591e869879
Коммит e2cb60d64a
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -1708,7 +1708,7 @@ nsLayoutUtils::GetFloatFromPlaceholder(nsIFrame* aFrame) {
if (aFrame->GetStateBits() & PLACEHOLDER_FOR_FLOAT) {
nsIFrame *outOfFlowFrame =
nsPlaceholderFrame::GetRealFrameForPlaceholder(aFrame);
NS_ASSERTION(outOfFlowFrame->IsFloating(),
NS_ASSERTION(outOfFlowFrame && outOfFlowFrame->IsFloating(),
"How did that happen?");
return outOfFlowFrame;
}