Skip to content

Commit

Permalink
fix(ios): resolve null pointer crash when loadBundleURL
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwcg committed Jun 7, 2024
1 parent e5e6291 commit 1735774
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 @@ -565,6 +565,9 @@ - (void)loadBundleURL:(NSURL *)bundleURL
__weak __typeof(self)weakSelf = self;
dispatch_async(HippyBridgeQueue(), ^{
__strong __typeof(weakSelf)strongSelf = weakSelf;
if (!strongSelf) {
return;
}
NSDictionary *userInfo = BUNDLE_LOAD_NOTI_SUCCESS_USER_INFO;
[[NSNotificationCenter defaultCenter] postNotificationName:HippyJavaScriptWillStartLoadingNotification
object:strongSelf
Expand Down

0 comments on commit 1735774

Please sign in to comment.