diff --git a/dnscrypt-proxy/plugin_block_name.go b/dnscrypt-proxy/plugin_block_name.go index 2d2bd4a8..1deb4633 100644 --- a/dnscrypt-proxy/plugin_block_name.go +++ b/dnscrypt-proxy/plugin_block_name.go @@ -108,7 +108,10 @@ func (plugin *PluginBlockName) Eval(pluginsState *PluginsState, msg *dns.Msg) er } qName := strings.ToLower(StripTrailingDot(questions[0].Name)) reject, reason, xweeklyRanges := plugin.patternMatcher.Eval(qName) - weeklyRanges := xweeklyRanges.(*WeeklyRanges) + var weeklyRanges *WeeklyRanges + if xweeklyRanges != nil { + weeklyRanges = xweeklyRanges.(*WeeklyRanges) + } if reject { if weeklyRanges != nil && !weeklyRanges.Match() { reject = false