From 6650fae7ad1e83b54f0e171113f19008585347ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 5 Apr 2017 22:11:24 +0200 Subject: [PATCH] tpl: Fix nil pointer in Tree() Fixes #3285 --- tpl/template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tpl/template.go b/tpl/template.go index 617aa84ec..356d66f1e 100644 --- a/tpl/template.go +++ b/tpl/template.go @@ -88,7 +88,7 @@ func (t *TemplateAdapter) Tree() string { panic("Unknown template") } - if tree.Root == nil { + if tree == nil || tree.Root == nil { return "" } s := tree.Root.String()