check nil config

pull/314/head
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
1 changed files with 6 additions and 1 deletions

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
}