iOS:fix when obj_retain DoricContext cause crash

This commit is contained in:
pengfeizhou
2021-02-09 15:09:52 +08:00
committed by osborn
parent a7e042174f
commit 3fa9124801
6 changed files with 23 additions and 19 deletions

View File

@@ -34,7 +34,7 @@ @implementation DoricBridgeExtension
- (id)callNativeWithContextId:(NSString *)contextId module:(NSString *)module method:(NSString *)method callbackId:(NSString *)callbackId argument:(id)argument {
__strong DoricContext *context = [[DoricContextManager instance] getContext:contextId];
if (context.destroyed) {
if (!context || context.destroyed) {
return nil;
}
Class pluginClass = [self.registry acquireNativePlugin:module];