avoid plugin call after context destroy

This commit is contained in:
王劲鹏 2021-06-09 18:11:34 +08:00 committed by osborn
parent d834336b3c
commit cbaa560dea

View File

@ -89,6 +89,9 @@ - (id)findClass:(Class)clz target:(id)target context:(DoricContext *)context met
} }
[invocation setArgument:&args atIndex:idx]; [invocation setArgument:&args atIndex:idx];
} }
if (!context || context.destroyed) {
return;
}
[invocation invoke]; [invocation invoke];
} @catch (NSException *exception) { } @catch (NSException *exception) {
DoricLog(@"CallNative Error:%@", exception.reason); DoricLog(@"CallNative Error:%@", exception.reason);