hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit 6650fae7ad1e83b54f0e171113f19008585347ef
parent b31da911b50dd2f2942e25df820cd724bcffd8ac
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Wed,  5 Apr 2017 22:11:24 +0200

tpl: Fix nil pointer in Tree()

Fixes #3285

Diffstat:
Mtpl/template.go | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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()