mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-03-20 21:39:30 +00:00
selector: Fix crash before start
This commit is contained in:
parent
4d9f11d5f0
commit
96dab3ba25
1 changed files with 5 additions and 1 deletions
|
@ -98,7 +98,11 @@ func (s *Selector) Start() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Selector) Now() string {
|
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 {
|
func (s *Selector) All() []string {
|
||||||
|
|
Loading…
Add table
Reference in a new issue