mirror of
https://github.com/Tencent/Hippy.git
synced 2026-10-23 01:18:30 +08:00
fix(ios): fix a potential crash due to null pointer (#985)
This commit is contained in:
@@ -422,6 +422,10 @@ 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());
|
||||
HippyAssert(context != nullptr, @"secondBundleLoadCompleted get null context");
|
||||
if (nullptr == context) {
|
||||
return;
|
||||
}
|
||||
NSString *workFolder = [self.bridge workFolder2];
|
||||
HippyAssert(workFolder, @"work folder path should not be null");
|
||||
if (workFolder) {
|
||||
|
||||
Reference in New Issue
Block a user