From: Bjørn Erik Pedersen Date: Mon, 9 May 2022 13:53:25 +0000 (+0200) Subject: hugolib: Check for nil in shouldRender X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=9d7f1662448439ad2058a5b48024f609e9784eb7;p=brevno-suite%2Fhugo hugolib: Check for nil in shouldRender --- diff --git a/hugolib/hugo_sites.go b/hugolib/hugo_sites.go index e0d69a8af..9f18f33bc 100644 --- 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 }