From f2237d3ac2152444c9b9ce20f12b4a572eb2c568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Su=C3=A1rez?= Date: Tue, 7 Sep 2021 13:28:06 +0200 Subject: [PATCH] Fix NRE in ListView Command validation (#14580) --- Xamarin.Forms.Core/ListView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Xamarin.Forms.Core/ListView.cs b/Xamarin.Forms.Core/ListView.cs index 6325233903c..2fe2fd4f9b5 100644 --- a/Xamarin.Forms.Core/ListView.cs +++ b/Xamarin.Forms.Core/ListView.cs @@ -544,7 +544,7 @@ internal override void OnIsPlatformEnabledChanged() void OnCommandCanExecuteChanged(object sender, EventArgs eventArgs) { - RefreshAllowed = RefreshCommand.CanExecute(null); + RefreshAllowed = RefreshCommand != null && RefreshCommand.CanExecute(null); } static void OnFooterChanged(BindableObject bindable, object oldValue, object newValue)