From eef994082cca1256ddd84680334182282ec99329 Mon Sep 17 00:00:00 2001 From: yusing Date: Sun, 12 Oct 2025 16:51:52 +0800 Subject: [PATCH] fix(panic): nil panic in IterRoutes --- internal/route/provider/provider.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/route/provider/provider.go b/internal/route/provider/provider.go index 61e25c26..85dd2da0 100644 --- a/internal/route/provider/provider.go +++ b/internal/route/provider/provider.go @@ -156,7 +156,11 @@ func (p *Provider) NumRoutes() int { func (p *Provider) IterRoutes(yield func(string, types.Route) bool) { routes := p.lockCloneRoutes() for alias, r := range routes { - if !yield(alias, r.Impl()) { + impl := r.Impl() + if impl == nil { + continue + } + if !yield(alias, impl) { break } }