mirror of
https://github.com/MetaCubeX/Clash.Meta.git
synced 2025-04-09 03:52:04 +00:00
Fix: crash when ip is nil
This commit is contained in:
parent
26a87f9d34
commit
5920b05752
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ func (i *IPCIDR) IsMatch(metadata *C.Metadata) bool {
|
|||
if i.isSourceIP {
|
||||
ip = metadata.SourceIP
|
||||
}
|
||||
return i.ipnet.Contains(*ip)
|
||||
return ip != nil && i.ipnet.Contains(*ip)
|
||||
}
|
||||
|
||||
func (i *IPCIDR) Adapter() string {
|
||||
|
|
Loading…
Add table
Reference in a new issue