p can be nil in Dconv so we need to do a check before dereferencing
it. Fixes a problem I was having running toolstash.
Change-Id: I34d6d278b319583d8454c2342ac88e054fc4b641
Reviewed-on: https://go-review.googlesource.com/20595
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
if a.Index != REG_NONE {
str += fmt.Sprintf("(%v*%d)", Rconv(int(a.Index)), int(a.Scale))
}
- if p.As == ATYPE && a.Gotype != nil {
+ if p != nil && p.As == ATYPE && a.Gotype != nil {
str += fmt.Sprintf("%s", a.Gotype.Name)
}