Przeglądaj źródła

fix segment fault when use api remote config

Yingyu Cheng 6 lat temu
rodzic
commit
1b1146dbaa
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      app/proxyman/outbound/outbound.go

+ 1 - 1
app/proxyman/outbound/outbound.go

@@ -130,7 +130,7 @@ func (m *Manager) RemoveHandler(ctx context.Context, tag string) error {
 	defer m.access.Unlock()
 
 	delete(m.taggedHandler, tag)
-	if m.defaultHandler.Tag() == tag {
+	if m.defaultHandler != nil && m.defaultHandler.Tag() == tag {
 		m.defaultHandler = nil
 	}