diff --git a/Xamarin.Forms.Platform.Android/Renderers/ShellFlyoutContentRenderer.cs b/Xamarin.Forms.Platform.Android/Renderers/ShellFlyoutContentRenderer.cs index df7db3d58..27f3e78a8 100644 --- a/Xamarin.Forms.Platform.Android/Renderers/ShellFlyoutContentRenderer.cs +++ b/Xamarin.Forms.Platform.Android/Renderers/ShellFlyoutContentRenderer.cs @@ -112,6 +112,7 @@ namespace Xamarin.Forms.Platform.Android { var drawable = await Context.GetFormsDrawable(source); menuItem.SetIcon(drawable); + drawable?.Dispose(); } } } \ No newline at end of file diff --git a/Xamarin.Forms.Platform.Android/Renderers/ShellItemRenderer.cs b/Xamarin.Forms.Platform.Android/Renderers/ShellItemRenderer.cs index e9c9799d7..e6412cf14 100644 --- a/Xamarin.Forms.Platform.Android/Renderers/ShellItemRenderer.cs +++ b/Xamarin.Forms.Platform.Android/Renderers/ShellItemRenderer.cs @@ -362,7 +362,7 @@ namespace Xamarin.Forms.Platform.Android return; var drawable = await Context.GetFormsDrawable(source); menuItem.SetIcon(drawable); - drawable.Dispose(); + drawable?.Dispose(); } void SetupMenu()