diff --git a/React/CoreModules/RCTLogBox.mm b/React/CoreModules/RCTLogBox.mm index d224052696cef2..4faa4a2db84cea 100644 --- a/React/CoreModules/RCTLogBox.mm +++ b/React/CoreModules/RCTLogBox.mm @@ -70,8 +70,12 @@ - (void)dealloc - (void)show { + __weak __typeof(self) weakSelf = self; [RCTSharedApplication().delegate.window.rootViewController presentViewController:_rootViewController animated:NO completion:^{ - [self->_rootViewController.view becomeFirstResponder]; + __strong __typeof(self) strongSelf = weakSelf; + if (strongSelf) { + [strongSelf->_rootViewController.view becomeFirstResponder]; + } }]; }