Fix a crash when UILaunchStoryboardName is not specified in Info.plist (flutter/engine#6234)

Some developers might prefer launch images.
This commit is contained in:
KyleWong
2018-09-13 12:08:01 +08:00
committed by James D. Lin
parent 65f6093433
commit 60ac4f0fe3

View File

@@ -392,6 +392,9 @@
if (_splashScreenView == nullptr) {
NSString* launchStoryboardName =
[[[NSBundle mainBundle] infoDictionary] objectForKey:@"UILaunchStoryboardName"];
if (launchStoryboardName == nil) {
return nil;
}
UIStoryboard* storyboard = [UIStoryboard storyboardWithName:launchStoryboardName bundle:nil];
if (storyboard == nil) {
return nil;