Skip to content

Commit

Permalink
fix(calendar): Fix possibly failing assert
Browse files Browse the repository at this point in the history
  • Loading branch information
dr1rrb committed Jun 1, 2021
1 parent 8610377 commit ddb505a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ private Size base_MeasureOverride(Size availableSize)
var itemSize = _layoutStrategy.GetElementMeasureSize(ElementType.ItemContainer, index, renderWindow); // Note: It's actually the same for all items
var itemBounds = _layoutStrategy.GetElementBounds(ElementType.ItemContainer, index + StartIndex, itemSize, layout, renderWindow);

if (itemSize.Width < _minCellSize.Width && itemSize.Height < _minCellSize.Height)
if (itemSize.Width < _minCellSize.Width && itemSize.Height < _minCellSize.Height || Cols == 0 || Rows == 0)
{
// We don't have any valid cell size yet (This measure pass has been caused by DetermineTheBiggestItemSize),
// so we stop right after having inserted the first child in the Children collection.
Expand Down

0 comments on commit ddb505a

Please sign in to comment.