summaryrefslogtreecommitdiffstats
path: root/models/notification.go
diff options
context:
space:
mode:
authorjaqra <48099350+jaqra@users.noreply.github.com>2019-12-13 05:08:34 +0300
committerAntoine GIRARD <sapk@users.noreply.github.com>2019-12-13 03:08:34 +0100
commit27f68bc96f951b4e95984f850cad87aca0128d4c (patch)
treeaaabb1b4496477b6c4ce321b97d0aa4c4f2e74ce /models/notification.go
parentba1acf5b50739a37014ea1a9bf502019c7562b27 (diff)
downloadgitea-27f68bc96f951b4e95984f850cad87aca0128d4c.tar.gz
gitea-27f68bc96f951b4e95984f850cad87aca0128d4c.zip
Fix notification page panic (#9337)
Diffstat (limited to 'models/notification.go')
-rw-r--r--models/notification.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/notification.go b/models/notification.go
index c8203754f9..5c03b49257 100644
--- a/models/notification.go
+++ b/models/notification.go
@@ -446,7 +446,7 @@ func (nl NotificationList) LoadComments() error {
}
for _, notification := range nl {
- if notification.CommentID > 0 && notification.Comment == nil {
+ if notification.CommentID > 0 && notification.Comment == nil && comments[notification.CommentID] != nil {
notification.Comment = comments[notification.CommentID]
notification.Comment.Issue = notification.Issue
}