1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-03 08:46:47 -05:00

check nil config

This commit is contained in:
Darien Raymond 2016-10-14 21:19:26 +02:00
parent b060bb3b94
commit f488a63d97
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -6,6 +6,11 @@ import (
// Apply applies this Config.
func (this *Config) Apply() error {
internet.ApplyGlobalNetworkSettings(this.NetworkSettings)
if this == nil {
return nil
}
if err := internet.ApplyGlobalNetworkSettings(this.NetworkSettings); err != nil {
return err
}
return nil
}