diff --git a/Xamarin.Forms.Platform.Android/Renderers/MasterDetailContainer.cs b/Xamarin.Forms.Platform.Android/Renderers/MasterDetailContainer.cs index 743bd2c6c..407d4a1e7 100644 --- a/Xamarin.Forms.Platform.Android/Renderers/MasterDetailContainer.cs +++ b/Xamarin.Forms.Platform.Android/Renderers/MasterDetailContainer.cs @@ -111,9 +111,8 @@ namespace Xamarin.Forms.Platform.Android void DisposeChildRenderers() { IVisualElementRenderer childRenderer = Platform.GetRenderer(_childView); - if (childRenderer != null) - childRenderer.Dispose(); - _childView.ClearValue(Platform.RendererProperty); + childRenderer?.Dispose(); + _childView?.ClearValue(Platform.RendererProperty); } Rectangle GetBounds(bool isMasterPage, int left, int top, int right, int bottom) @@ -152,4 +151,4 @@ namespace Xamarin.Forms.Platform.Android } } } -} \ No newline at end of file +}