Skip to content

Commit

Permalink
fix(ios): add nil protection when bridge released during loading bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwcg committed Oct 17, 2024
1 parent f7da94c commit 72053fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions framework/ios/base/bridge/HippyBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,9 @@ - (void)beginLoadingBundle:(NSURL *)bundleURL
dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
[strongSelf fetchBundleWithURL:bundleURL completion:^(NSData *source, NSError *error) {
__strong __typeof(weakSelf)strongSelf = weakSelf;
if (!strongSelf || !bundleURL) {
return;
}
NSDictionary *userInfo;
if (error) {
HippyBridgeFatal(error, strongSelf);
Expand Down

0 comments on commit 72053fe

Please sign in to comment.