Просмотр исходного кода

Merge pull request #1810 from winguse/patch-1

fix segment fault when use api remote config
Xiaokang Wang 6 лет назад
Родитель
Сommit
adc9073d3d
1 измененных файлов с 1 добавлено и 1 удалено
  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
 	}