From 3a969bc07588a8c92be4c3cfd096ba1f24e98270 Mon Sep 17 00:00:00 2001 From: Craig Peterson Date: Fri, 13 Oct 2017 11:08:17 -0400 Subject: [PATCH] add nil check --- caddyfile/parse.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/caddyfile/parse.go b/caddyfile/parse.go index 1bf84ecc..84eb2181 100644 --- a/caddyfile/parse.go +++ b/caddyfile/parse.go @@ -247,7 +247,7 @@ func (p *parser) doImport() error { var importedTokens []Token // first check macros. That is a simple, non-recursive replacement - if p.definedMacros[importPattern] != nil { + if p.definedMacros != nil && p.definedMacros[importPattern] != nil { importedTokens = p.definedMacros[importPattern] } else { // make path relative to Caddyfile rather than current working directory (issue #867)