hugo

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

git clone git://git.shimmy1996.com/hugo.git
commit 9d7f1662448439ad2058a5b48024f609e9784eb7
parent 51f08b0b6aae175299b4e73d521343a4386a9cf7
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Mon,  9 May 2022 15:53:25 +0200

hugolib: Check for nil in shouldRender

Diffstat:
Mhugolib/hugo_sites.go | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/hugolib/hugo_sites.go b/hugolib/hugo_sites.go
@@ -727,6 +727,10 @@ type BuildCfg struct {
 // For regular builds, this will allways return true.
 // TODO(bep) rename/work this.
 func (cfg *BuildCfg) shouldRender(p *pageState) bool {
+	if p == nil {
+		return false
+	}
+
 	if p.forceRender {
 		return true
 	}