From 4b7a9d066acd76bf5e3111c52759f554d399f33c Mon Sep 17 00:00:00 2001 From: Andres Pineda <1900897+ajpinedam@users.noreply.github.com> Date: Thu, 20 Aug 2020 15:47:38 -0400 Subject: [PATCH] fix: validate for null Co-authored-by: David --- src/Uno.UI/UI/Xaml/Controls/Pivot/Pivot.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Uno.UI/UI/Xaml/Controls/Pivot/Pivot.cs b/src/Uno.UI/UI/Xaml/Controls/Pivot/Pivot.cs index 32b4a62b883e..29973760561b 100644 --- a/src/Uno.UI/UI/Xaml/Controls/Pivot/Pivot.cs +++ b/src/Uno.UI/UI/Xaml/Controls/Pivot/Pivot.cs @@ -259,7 +259,7 @@ private static void OnTitlePropertyChanged(DependencyObject dependencyObject, De private void OnSelectedItemPropertyChanged(object oldValue, object newValue) { var removedItems = oldValue == null ? new object[0] : new [] { oldValue }; - var addedItems = new [] { newValue }; + var addedItems = newValue == null ? new object[0] : new [] { newValue }; OnSelectedItemChangedPartial(oldValue, newValue);