From ab3665c13e788b7fa116e611a5b13849062493f5 Mon Sep 17 00:00:00 2001 From: kingces95 Date: Thu, 29 Aug 2019 13:39:49 -1000 Subject: [PATCH] Fix NRE for gh 4267 (#7306) --- Xamarin.Forms.Platform.iOS/ContextActionCell.cs | 3 +++ Xamarin.Forms.Platform.iOS/Platform.cs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Xamarin.Forms.Platform.iOS/ContextActionCell.cs b/Xamarin.Forms.Platform.iOS/ContextActionCell.cs index 913be609b..2db3c22e2 100644 --- a/Xamarin.Forms.Platform.iOS/ContextActionCell.cs +++ b/Xamarin.Forms.Platform.iOS/ContextActionCell.cs @@ -81,6 +81,9 @@ namespace Xamarin.Forms.Platform.iOS public void Close() { + if (_scroller == null) + return; + _scroller.ContentOffset = new PointF(0, 0); } diff --git a/Xamarin.Forms.Platform.iOS/Platform.cs b/Xamarin.Forms.Platform.iOS/Platform.cs index 21fb6e7b7..ef0c9f9a0 100644 --- a/Xamarin.Forms.Platform.iOS/Platform.cs +++ b/Xamarin.Forms.Platform.iOS/Platform.cs @@ -21,7 +21,7 @@ namespace Xamarin.Forms.Platform.iOS #if DEBUG if (oldvalue != null && newvalue != null) { - Log.Warning("Renderer", $"{bindable} already has a renderer attached to it: {oldvalue}. Please figure out why and then fix it.", nameof(oldvalue)); + Log.Warning("Renderer", $"{bindable} already has a renderer attached to it: {oldvalue}. Please figure out why and then fix it."); } #endif var view = bindable as VisualElement;