From 3bb8d22e4456ae13e3300cbd789fd836511df23b Mon Sep 17 00:00:00 2001 From: Hampton Maxwell Date: Mon, 18 Feb 2019 21:34:46 -0800 Subject: [PATCH] Merge pull request #1246 from niklassaers/master Instead of crashing, show a warning and return (rebased from commit f69231fe819b853f89ffaad051d3ec239585a6f7) --- ios/Video/RCTVideo.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ios/Video/RCTVideo.m b/ios/Video/RCTVideo.m index 98a184a01e..47f52294d3 100644 --- a/ios/Video/RCTVideo.m +++ b/ios/Video/RCTVideo.m @@ -743,6 +743,10 @@ - (void)playerItemForSource:(NSDictionary *)source NSString *audioUri = [audio objectForKey:@"uri"]; // ZL uri = @"http://192.168.2.228:8987/piss.mp4"; // ZL NSString *type = [source objectForKey:@"type"]; + if (!uri || [uri isEqualToString:@""]) { + DebugLog(@"Could not find video URL in source '%@'", source); + return; + } NSURL *url = isNetwork || isAsset ? [NSURL URLWithString:uri]