From c5dd9f80d1eaf07208eaf659b742cafb405932b5 Mon Sep 17 00:00:00 2001 From: Francesco Bonacci Date: Wed, 25 Jul 2018 14:34:22 +0200 Subject: [PATCH] Add check for null _root flex item (#3235) --- Xamarin.Forms.Core/FlexLayout.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Xamarin.Forms.Core/FlexLayout.cs b/Xamarin.Forms.Core/FlexLayout.cs index 25bd62462..cb394c8b8 100644 --- a/Xamarin.Forms.Core/FlexLayout.cs +++ b/Xamarin.Forms.Core/FlexLayout.cs @@ -388,6 +388,9 @@ namespace Xamarin.Forms protected override void LayoutChildren(double x, double y, double width, double height) { + if (_root == null) + return; + Layout(x, y, width, height); foreach (var child in Children) { var frame = GetFlexItem(child).GetFrame();