diff --git a/doric-iOS/Pod/Classes/Extension/DoricBridgeExtension.m b/doric-iOS/Pod/Classes/Extension/DoricBridgeExtension.m index 9f852b3e..d122f521 100644 --- a/doric-iOS/Pod/Classes/Extension/DoricBridgeExtension.m +++ b/doric-iOS/Pod/Classes/Extension/DoricBridgeExtension.m @@ -34,6 +34,9 @@ @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) { + return nil; + } DoricRegistry *registry = context.driver.registry; Class pluginClass = [registry acquireNativePlugin:module]; DoricNativePlugin *nativePlugin = context.pluginInstanceMap[module];