From c37507768cc1bff00a1e574c7fc5038a8a949983 Mon Sep 17 00:00:00 2001 From: Niklas Saers Date: Wed, 19 Sep 2018 12:02:55 +0200 Subject: [PATCH] Instead of crashing, show a warning and return --- ios/Video/RCTVideo.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ios/Video/RCTVideo.m b/ios/Video/RCTVideo.m index 9fe30b63..0302960b 100644 --- a/ios/Video/RCTVideo.m +++ b/ios/Video/RCTVideo.m @@ -436,6 +436,10 @@ static int const RCTVideoUnset = -1; bool isAsset = [RCTConvert BOOL:[source objectForKey:@"isAsset"]]; NSString *uri = [source objectForKey:@"uri"]; NSString *type = [source objectForKey:@"type"]; + if([uri isEqualToString:@""] || [type isEqualToString:@""]) { + DebugLog(@"Could not find video URL in source '%@'", source); + return; + } NSURL *url = isNetwork || isAsset ? [NSURL URLWithString:uri]