Only call refreshViews if the VM service is available (#5474)
Fixes https://github.com/flutter/flutter/issues/5468
This commit is contained in:
committed by
John McCutchan
parent
a4ea12c470
commit
073f64de1a
@@ -185,8 +185,10 @@ class RunAndStayResident extends ResidentRunner {
|
||||
|
||||
printStatus('Application running.');
|
||||
|
||||
await vmService.vm.refreshViews();
|
||||
printStatus('Connected to view \'${vmService.vm.mainView}\'.');
|
||||
if (vmService != null) {
|
||||
await vmService.vm.refreshViews();
|
||||
printStatus('Connected to view \'${vmService.vm.mainView}\'.');
|
||||
}
|
||||
|
||||
if (vmService != null && traceStartup) {
|
||||
printStatus('Downloading startup trace info...');
|
||||
|
||||
Reference in New Issue
Block a user