fix an NPE when the flutter.yaml file is missing

This commit is contained in:
Devon Carew
2016-02-10 15:41:57 -08:00
parent 4e4887a93e
commit aa66a7720c
2 changed files with 6 additions and 4 deletions

View File

@@ -242,9 +242,11 @@ Future<_ApkComponents> _findApkComponents(
components.debugKeystore = new File(artifactPaths[3]);
components.resources = new Directory(resources);
await parseServiceConfigs(components.services,
jars: components.jars,
androidSdk: components.androidSdk.path);
await parseServiceConfigs(
components.services,
jars: components.jars,
androidSdk: components.androidSdk.path
);
if (!components.resources.existsSync()) {
// TODO(eseidel): This level should be higher when path is manually set.

View File

@@ -29,7 +29,7 @@ Future parseServiceConfigs(
return;
dynamic manifest = _loadYamlFile(_kFlutterManifestPath);
if (manifest['services'] == null)
if (manifest == null || manifest['services'] == null)
return;
for (String service in manifest['services']) {