fix(ios): crash fixed,improve stability (#1042)

This commit is contained in:
luomy
2021-11-05 10:49:46 +08:00
committed by GitHub
parent d2bbd99c36
commit 395803bfcf
+5 -1
View File
@@ -451,7 +451,11 @@ HIPPY_EXPORT_METHOD(setContextName:(NSString *)contextName) {
}
- (void)secondBundleLoadCompleted:(BOOL)success {
std::shared_ptr<hippy::napi::JSCCtx> context = std::static_pointer_cast<hippy::napi::JSCCtx>(self.pScope->GetContext());
std::shared_ptr<Scope> scope = self.pScope;
if (!scope) {
return;
}
std::shared_ptr<hippy::napi::JSCCtx> context = std::static_pointer_cast<hippy::napi::JSCCtx>(scope->GetContext());
HippyAssert(context != nullptr, @"secondBundleLoadCompleted get null context");
if (nullptr == context) {
return;