cmd/trace: Fix nil pointer panic in trace subcommand

This commit is contained in:
Derek Parker
2015-12-27 18:36:54 -08:00
parent 1aa83e30e0
commit 6d68d1aefa

View File

@ -186,6 +186,9 @@ starts and attaches to it, and enables you to immediately begin debugging your p
for { for {
select { select {
case state := <-stateChan: case state := <-stateChan:
if state == nil {
return 0
}
if state.Err != nil { if state.Err != nil {
fmt.Fprintln(os.Stderr, state.Err) fmt.Fprintln(os.Stderr, state.Err)
return 0 return 0