Guard against invalid last disconnect time

This commit is contained in:
Gabe Kangas 2021-06-20 20:16:27 -07:00
parent e61b83c5ed
commit 20c272ff3d

View file

@ -148,7 +148,7 @@ func getSavedStats() models.Stats {
savedLastDisconnectTime, savedLastDisconnectTimeErr := data.GetLastDisconnectTime()
var lastDisconnectTime utils.NullTime
if savedLastDisconnectTimeErr == nil {
if savedLastDisconnectTimeErr == nil && savedLastDisconnectTime.Valid {
lastDisconnectTime = savedLastDisconnectTime
}