Unverified Commit 836c16ef authored by jensjoha's avatar jensjoha Committed by GitHub

Only access globals.deviceManager if actually setting something (#111461)

parent b84bfa35
......@@ -256,7 +256,10 @@ class FlutterCommandRunner extends CommandRunner<void> {
}
// See if the user specified a specific device.
globals.deviceManager?.specifiedDeviceId = topLevelResults['device-id'] as String?;
final String? specifiedDeviceId = topLevelResults['device-id'] as String?;
if (specifiedDeviceId != null) {
globals.deviceManager?.specifiedDeviceId = specifiedDeviceId;
}
if ((topLevelResults['version'] as bool?) ?? false) {
globals.flutterUsage.sendCommand('version');
......
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