From f488a63d97c99963d3d8d41d3d6870cf70a7cb52 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Fri, 14 Oct 2016 21:19:26 +0200 Subject: [PATCH] check nil config --- transport/config.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/transport/config.go b/transport/config.go index c5349908..7c5bfbcd 100644 --- a/transport/config.go +++ b/transport/config.go @@ -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 }