Skip to content

Commit 869298b

Browse files
committed
fix nil pointer
1 parent 4586ae3 commit 869298b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

models/issue_comment.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,12 @@ func createDeadlineComment(e *xorm.Session, doer *User, issue *Issue, newDeadlin
708708
content = newDeadlineUnix.Format("2006-01-02") + "|" + issue.DeadlineUnix.Format("2006-01-02")
709709
}
710710

711+
if issue.Repo == nil {
712+
if err := issue.LoadRepo(); err != nil {
713+
return nil, err
714+
}
715+
}
716+
711717
return createComment(e, &CreateCommentOptions{
712718
Type: commentType,
713719
Doer: doer,

0 commit comments

Comments
 (0)