From d1411f11d3f2702c79d01b01dccadea32184f7d8 Mon Sep 17 00:00:00 2001 From: Marc Horowitz Date: Mon, 6 Mar 2017 11:57:40 -0800 Subject: [PATCH] Drop calls to [RCTCxxBridge enqueueCallback:args:] on an invalid instance Reviewed By: mmmulani Differential Revision: D4655339 fbshipit-source-id: a6cb026325a030fa15a25638ebfb17ac9ea53767 --- React/CxxBridge/RCTCxxBridge.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/React/CxxBridge/RCTCxxBridge.mm b/React/CxxBridge/RCTCxxBridge.mm index 02f65e2a5..431c59f4f 100644 --- a/React/CxxBridge/RCTCxxBridge.mm +++ b/React/CxxBridge/RCTCxxBridge.mm @@ -1137,6 +1137,10 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithBundleURL:(__unused NSURL *)bundleUR */ - (void)enqueueCallback:(NSNumber *)cbID args:(NSArray *)args { + if (!self.valid) { + return; + } + /** * AnyThread */