[shared] BannerView: add an assertion to avoid deferencing nullptr

This commit is contained in:
Émilie Feral
2019-06-14 16:40:51 -04:00
committed by LeaNumworks
parent b485319e76
commit 709a7028e8

View File

@@ -52,6 +52,7 @@ void BannerView::layoutSubviews() {
x += width;
}
// Next line
assert(subviewPreviousLine);
y += subviewPreviousLine->minimalSizeForOptimalDisplay().height() + LineSpacing;
remainingWidth = lineWidth;
indexOfFirstViewOfCurrentLine = i;