From cbaa560deaa410494a9620a1680de3602a9a13cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Wed, 9 Jun 2021 18:11:34 +0800 Subject: [PATCH] avoid plugin call after context destroy --- doric-iOS/Pod/Classes/Extension/DoricBridgeExtension.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doric-iOS/Pod/Classes/Extension/DoricBridgeExtension.m b/doric-iOS/Pod/Classes/Extension/DoricBridgeExtension.m index 4c996108..710ae3e7 100644 --- a/doric-iOS/Pod/Classes/Extension/DoricBridgeExtension.m +++ b/doric-iOS/Pod/Classes/Extension/DoricBridgeExtension.m @@ -89,6 +89,9 @@ - (id)findClass:(Class)clz target:(id)target context:(DoricContext *)context met } [invocation setArgument:&args atIndex:idx]; } + if (!context || context.destroyed) { + return; + } [invocation invoke]; } @catch (NSException *exception) { DoricLog(@"CallNative Error:%@", exception.reason);