fix: panic on IPv6

This commit is contained in:
Leo
2023-01-18 13:44:47 +08:00
parent 09a5b42443
commit 326034b41e

View File

@@ -120,7 +120,9 @@ func (t *ICMPTracerv6) Execute() (*Result, error) {
Error: ErrHopLimitTimeout,
})
}
t.RealtimePrinter(&t.res, t.MaxHops-1)
if t.RealtimePrinter != nil {
t.RealtimePrinter(&t.res, t.MaxHops-1)
}
}
return &t.res, nil