diff --git a/proc/threads.go b/proc/threads.go index daadd069..859d6ddb 100644 --- a/proc/threads.go +++ b/proc/threads.go @@ -308,6 +308,8 @@ func (thread *Thread) getG() (g *G, err error) { return nil, err } g, err = parseG(thread, regs.CX(), false) - g.thread = thread + if err == nil { + g.thread = thread + } return }