Commit aa66a772 authored by Devon Carew's avatar Devon Carew

fix an NPE when the flutter.yaml file is missing

parent 4e4887a9
......@@ -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.
......
......@@ -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']) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment