summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/gc_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/runtime/gc_test.go')
-rw-r--r--src/pkg/runtime/gc_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pkg/runtime/gc_test.go b/src/pkg/runtime/gc_test.go
index a3c731ccb..dbd68c1c7 100644
--- a/src/pkg/runtime/gc_test.go
+++ b/src/pkg/runtime/gc_test.go
@@ -136,7 +136,9 @@ func TestGcRescan(t *testing.T) {
for i := 0; i < 10; i++ {
p := &Y{}
p.c = make(chan error)
- p.nextx = &head.X
+ if head != nil {
+ p.nextx = &head.X
+ }
p.nexty = head
p.p = new(int)
*p.p = 42