diff --git a/ios/RNMBX/RNMBXMapViewComponentView.mm b/ios/RNMBX/RNMBXMapViewComponentView.mm index 3dcffb888..6ee6808cd 100644 --- a/ios/RNMBX/RNMBXMapViewComponentView.mm +++ b/ios/RNMBX/RNMBXMapViewComponentView.mm @@ -120,6 +120,9 @@ - (void)unmountChildComponentView:(UIView *)childCompo } - (void)dispatchCameraChangedEvent:(NSDictionary*)event { + if (self->_eventEmitter == nullptr) { + return; + } const auto [type, json] = RNMBXStringifyEventData(event); std::dynamic_pointer_cast(self->_eventEmitter)->onCameraChanged({type, json}); }