mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-06-27 20:52:40 +03:00
selector: Fix crash before start
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user