Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[macOS] Fix crash using Shell SearchHandler on Catalyst #11926

Merged
merged 13 commits into from
Feb 15, 2023
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using Foundation;
using ObjCRuntime;
using UIKit;
Expand All @@ -24,7 +24,7 @@ internal UIContainerCell(string cellId, View view, Shell shell, object context)

if (_renderer == null)
{
_renderer = (IPlatformViewHandler)view.ToHandler(shell.FindMauiContext());
_renderer = (IPlatformViewHandler)view.ToHandler(shell != null ? shell.FindMauiContext() : view.FindMauiContext());
mattleibow marked this conversation as resolved.
Show resolved Hide resolved
}

ContentView.AddSubview(_renderer.PlatformView);
Expand Down