Skip to content
Permalink
Browse files

Check for nullptr when accessing isInspectable method

Reviewed By: javache

Differential Revision: D6785733

fbshipit-source-id: 1bbb884746e671124b7d2d950a3419ea33d70522
  • Loading branch information...
fromcelticpark authored and facebook-github-bot committed Jan 23, 2018
1 parent 4f6c157 commit 70d23e82ad21a4cfde1ce7c3b1c00fe7c7d5adbd
Showing with 4 additions and 3 deletions.
  1. +4 −3 React/CxxBridge/RCTCxxBridge.mm
@@ -191,11 +191,12 @@ + (void)initialize

- (JSGlobalContextRef)jsContextRef
{
return (JSGlobalContextRef)(self->_reactInstance ? self->_reactInstance->getJavaScriptContext() : nullptr);
return (JSGlobalContextRef)(_reactInstance ? _reactInstance->getJavaScriptContext() : nullptr);
}

- (BOOL)isInspectable {
return self->_reactInstance->isInspectable();
- (BOOL)isInspectable
{
return _reactInstance ? _reactInstance->isInspectable() : NO;
}

- (instancetype)initWithParentBridge:(RCTBridge *)bridge

0 comments on commit 70d23e8

Please sign in to comment.
You can’t perform that action at this time.