mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-24 01:21:30 +00:00
selector: Fix crash before start
This commit is contained in:
parent
de14337b4b
commit
0bb1132034
|
@ -97,7 +97,11 @@ func (s *Selector) Start() error {
|
|||
}
|
||||
|
||||
func (s *Selector) Now() string {
|
||||
return s.selected.Tag()
|
||||
selected := s.selected
|
||||
if selected == nil {
|
||||
return s.tags[0]
|
||||
}
|
||||
return selected.Tag()
|
||||
}
|
||||
|
||||
func (s *Selector) All() []string {
|
||||
|
|
Loading…
Reference in a new issue