1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-11-13 15:14:56 -05:00

check nil config

This commit is contained in:
Darien Raymond
2016-10-14 21:19:26 +02:00
parent b060bb3b94
commit f488a63d97

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
}