diff options
author | Joe <rbo@gmx.us> | 2023-12-21 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2023-12-21 20:20:20 +0100 |
commit | cd5c1143d377c6238ccea57862bd20d4f997ca77 (patch) | |
tree | 925b5db30d66e3f2f20999d139302a359f38ada2 /c_lhosts.go | |
parent | cool delete (diff) | |
download | hardflip-cd5c1143d377c6238ccea57862bd20d4f997ca77.tar.gz hardflip-cd5c1143d377c6238ccea57862bd20d4f997ca77.tar.bz2 hardflip-cd5c1143d377c6238ccea57862bd20d4f997ca77.tar.xz hardflip-cd5c1143d377c6238ccea57862bd20d4f997ca77.tar.zst hardflip-cd5c1143d377c6238ccea57862bd20d4f997ca77.zip |
fixed segv
Diffstat (limited to '')
-rw-r--r-- | c_lhosts.go | 3 |
1 files changed, 3 insertions, 0 deletions
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 } |