- dnsfilter: fix npe in dnsfilter test

This commit is contained in:
Aleksey Dmitrevskiy 2019-04-23 15:09:23 +03:00
parent 0794704f74
commit a860c8e6ff
1 changed files with 1 additions and 1 deletions

View File

@ -1038,7 +1038,7 @@ func New(c *Config) *Dnsfilter {
TLSHandshakeTimeout: 10 * time.Second,
ExpectContinueTimeout: 1 * time.Second,
}
if len(c.ResolverAddress) != 0 {
if c != nil && len(c.ResolverAddress) != 0 {
resolverAddr = c.ResolverAddress
d.transport.DialContext = customDialContext
}