Skip to content

Commit 4fb3980

Browse files
committed
fix(ios): add nil protection when bridge released during loading bundle
1 parent c0df47b commit 4fb3980

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

framework/ios/base/bridge/HippyBridge.mm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,9 @@ - (void)beginLoadingBundle:(NSURL *)bundleURL
558558
dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
559559
[strongSelf fetchBundleWithURL:bundleURL completion:^(NSData *source, NSError *error) {
560560
__strong __typeof(weakSelf)strongSelf = weakSelf;
561+
if (!strongSelf || !bundleURL) {
562+
return;
563+
}
561564
NSDictionary *userInfo;
562565
if (error) {
563566
HippyBridgeFatal(error, strongSelf);

0 commit comments

Comments
 (0)