Skip to content

Commit

Permalink
Check for nullptr when accessing isInspectable method
Browse files Browse the repository at this point in the history
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 70d23e8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions React/CxxBridge/RCTCxxBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 70d23e8

Please sign in to comment.