From e33e0839dea8e7584fd7338cec2bcbaaea48eec2 Mon Sep 17 00:00:00 2001 From: Samuel Brucksch Date: Wed, 18 Feb 2026 15:33:52 +0100 Subject: [PATCH] Add null check for eventEmitter in dispatchCameraChangedEvent --- ios/RNMBX/RNMBXMapViewComponentView.mm | 3 +++ 1 file changed, 3 insertions(+) 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}); }