mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-15 12:53:41 +00:00
Prevent nil request panic during resolve
This commit is contained in:
1 parent
6f0cfdcd91
commit
c2ada7dbaa
3 files changed
+22
-1
No files matched your search
@@ -548,7 +548,7 @@ func (s *Script) match(event ActivationEvent, req *base.Request) bool {
|
||||
if s.Event != string(event) {
|
||||
return false
|
||||
}
|
||||
if s.Match == nil || (len(s.Match.Urls) == 0 && len(s.Match.Labels) == 0) {
|
||||
if req == nil || s.Match == nil || (len(s.Match.Urls) == 0 && len(s.Match.Labels) == 0) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user