diff --git a/src/Uno.UI/UI/Xaml/Controls/Grid/Grid.cs b/src/Uno.UI/UI/Xaml/Controls/Grid/Grid.cs index 8593414a475e..321446d681a4 100644 --- a/src/Uno.UI/UI/Xaml/Controls/Grid/Grid.cs +++ b/src/Uno.UI/UI/Xaml/Controls/Grid/Grid.cs @@ -1315,6 +1315,12 @@ protected override XSIZEF MeasureOverride(XSIZEF availableSize) //------------------------------------------------------------------------ protected override XSIZEF ArrangeOverride(XSIZEF finalSize) { + if (m_pRows == null || m_pColumns == null) + { + // Should call .Measure() first! + return default; + } + // Locking the row and columns definitions to prevent changes by user code // during the arrange pass. LockDefinitions();