Skip to content

Commit

Permalink
fix System.NullReferenceException when disconnecting Handler (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
sferhah authored Oct 29, 2024
1 parent a99b40c commit ce99d91
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions HybridWebView/HybridWebView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ protected override async void OnHandlerChanged()

await InitializeHybridWebView();

// HybridWebViewInitialized assumes Handler != null
if (Handler == null)
{
return;
}

HybridWebViewInitialized?.Invoke(this, new HybridWebViewInitializedEventArgs()
{
#if ANDROID || IOS || MACCATALYST || WINDOWS
Expand Down

0 comments on commit ce99d91

Please sign in to comment.