aboutsummaryrefslogtreecommitdiffhomepage
path: root/ir/ir.go
diff options
context:
space:
mode:
Diffstat (limited to 'ir/ir.go')
-rw-r--r--ir/ir.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/ir/ir.go b/ir/ir.go
index 684d94a4a..fd1cbe85a 100644
--- a/ir/ir.go
+++ b/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 {