Browse Source

check nil

Darien Raymond 9 năm trước cách đây
mục cha
commit
5e9017720e
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      proxy/dokodemo/config.go

+ 5 - 1
proxy/dokodemo/config.go

@@ -5,5 +5,9 @@ import (
 )
 
 func (this *Config) GetPredefinedAddress() v2net.Address {
-	return this.Address.AsAddress()
+	addr := this.Address.AsAddress()
+	if addr == nil {
+		return nil
+	}
+	return addr
 }