We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ffffe97 commit 7b64af5Copy full SHA for 7b64af5
ios/RNRecorderManager.m
@@ -52,12 +52,14 @@ - (UIView *)view
52
53
SCRecordSessionSegment* ls = [_recorderView lastSegment];
54
55
- NSString *thumbnail = [_recorderView saveImage:ls.thumbnail];
56
- NSString *url = [ls.url relativeString];
57
- float duration = CMTimeGetSeconds(ls.duration);
58
-
59
- NSDictionary *props = @{@"url": url, @"thumbnail":thumbnail, @"duration":@(duration)};
60
- callback(@[props]);
+ if (ls != nil) {
+ NSString *thumbnail = [_recorderView saveImage:ls.thumbnail];
+ NSString *url = [ls.url relativeString];
+ float duration = CMTimeGetSeconds(ls.duration);
+
+ NSDictionary *props = @{@"url": url, @"thumbnail":thumbnail, @"duration":@(duration)};
61
+ callback(@[props]);
62
+ }
63
64
}];
65
}
0 commit comments