From cd5c1143d377c6238ccea57862bd20d4f997ca77 Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 21 Dec 2023 20:20:20 +0100 Subject: fixed segv --- c_lhosts.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'c_lhosts.go') diff --git a/c_lhosts.go b/c_lhosts.go index 9425231..52e2b46 100644 --- a/c_lhosts.go +++ b/c_lhosts.go @@ -124,6 +124,9 @@ func (lhost *HostList) del(id uint64) { func (lhost *HostList) sel(id uint64) *HostNode { curr := lhost.head + if curr == nil { + return nil + } for curr.next != nil && curr.ID != id { curr = curr.next } -- cgit v1.2.3