Skip to content

Commit 816e95b

Browse files
authored
Merge pull request react-native-camera#1814 from react-native-community/fix-ios-race-codition
[ios] fix possible race condition in removeFromSuperview
2 parents 421fd03 + 8cd958e commit 816e95b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ios/RN/RNCamera.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ - (void)removeReactSubview:(UIView *)subview
132132

133133
- (void)removeFromSuperview
134134
{
135-
[self stopSession];
136135
[super removeFromSuperview];
137136
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIDeviceOrientationDidChangeNotification object:nil];
137+
[self stopSession];
138138
}
139139

140140
-(void)updateType

0 commit comments

Comments
 (0)