Browse Source

ir: fix nil pointer dereference in IsVolatile

pull/28/head
Ayke van Laethem 6 years ago
parent
commit
318567f398
No known key found for this signature in database GPG Key ID: E97FF5335DFDFDED
  1. 3
      ir/ir.go

3
ir/ir.go

@ -425,6 +425,9 @@ func (p *Program) IsVolatile(t types.Type) bool {
if t, ok := t.(*types.Named); !ok {
return false
} else {
if t.Obj().Pkg() == nil {
return false
}
id := t.Obj().Pkg().Path() + "." + t.Obj().Name()
doc := p.comments[id]
if doc == nil {

Loading…
Cancel
Save