Only call refreshViews if the VM service is available (#5474)

Fixes https://github.com/flutter/flutter/issues/5468
This commit is contained in:
Jason Simmons 2016-08-18 06:38:35 -07:00 committed by John McCutchan
parent a4ea12c470
commit 073f64de1a

View File

@ -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...');