Check for nullptr when accessing isInspectable method
Reviewed By: javache Differential Revision: D6785733 fbshipit-source-id: 1bbb884746e671124b7d2d950a3419ea33d70522
This commit is contained in:
parent
4f6c157250
commit
70d23e82ad
|
@ -191,11 +191,12 @@ struct RCTInstanceCallback : public InstanceCallback {
|
|||
|
||||
- (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
|
||||
|
|
Loading…
Reference in New Issue