Browse Source

check nil for outbound config

Darien Raymond 8 years ago
parent
commit
57fc444b3c
1 changed files with 3 additions and 0 deletions
  1. 3 0
      tools/conf/v2ray.go

+ 3 - 0
tools/conf/v2ray.go

@@ -339,6 +339,9 @@ func (v *Config) Build() (*core.Config, error) {
 		config.Inbound = append(config.Inbound, ic)
 	}
 
+	if v.OutboundConfig == nil {
+		return nil, errors.New("Config: No outbound config specified.")
+	}
 	oc, err := v.OutboundConfig.Build()
 	if err != nil {
 		return nil, err