Skip to content

Commit

Permalink
SEBMAC-478 Another attempt to fix crash in [SEBBrowserTabViewControll…
Browse files Browse the repository at this point in the history
…er closeTabWithIndex:] according to macOS version.
  • Loading branch information
danschlet committed Feb 20, 2023
1 parent 9dc784d commit 05803be
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions SEB/Classes/BrowserComponents/SEBBrowserTabViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,7 @@ - (void) closeTabWithIndex:(NSUInteger)tabIndex
// by properly releasing it
[webViewController.sebWebView stopMediaPlaybackWithCompletionHandler:^{
dispatch_async(dispatch_get_main_queue(), ^{
[webViewController.sebWebView closeWKWebView];
webViewController.sebWebView = nil;
webViewController.view = nil;
webViewController = nil;
Expand Down Expand Up @@ -835,6 +836,7 @@ - (void) closeAllTabs
// Prevent media player from playing audio after its webview was closed
// by properly releasing it
[webViewController.sebWebView stopMediaPlaybackWithCompletionHandler:^{
[webViewController.sebWebView closeWKWebView];
webViewController.sebWebView = nil;
webViewController.view = nil;
webViewController = nil;
Expand Down

0 comments on commit 05803be

Please sign in to comment.