fix a nil deref in event page
Ted Unangst tedu@tedunangst.com
Mon, 16 Dec 2019 17:36:04 -0500
1 files changed,
5 insertions(+),
1 deletions(-)
jump to
M
database.go
→
database.go
@@ -191,7 +191,11 @@ return t1.After(t2)
}) now := time.Now().Add(-24 * time.Hour) for i, h := range honks { - if h.Time.StartTime.Before(now) { + t := h.Date + if tm := h.Time; tm != nil { + t = tm.StartTime + } + if t.Before(now) { honks = honks[:i] break }