]> source.dussan.org Git - gitea.git/commit
Prevent NPE on commenting on lines with invalidated comments (#12549) (#12550)
authorzeripath <art27@cantab.net>
Fri, 21 Aug 2020 07:52:20 +0000 (08:52 +0100)
committerGitHub <noreply@github.com>
Fri, 21 Aug 2020 07:52:20 +0000 (10:52 +0300)
commit03ba12aabf95ced8398c7859deff76780a4577cd
treeffa081b5aec4e160279f81e2284588201cdee19e
parent24ed1b5feb8c7417f3780e43ef0fe8b0c5517c27
Prevent NPE on commenting on lines with invalidated comments (#12549) (#12550)

* Prevent NPE on commenting on lines with invalidated comments

Only check for a review if we are replying to a previous review.

Prevent the NPE in #12239 by assuming that a comment without a Review is
non-pending.

Fix #12239

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add hack around to show the broken comments

Signed-off-by: Andrew Thornton <art27@cantab.net>
services/pull/review.go
templates/repo/diff/box.tmpl
templates/repo/diff/section_unified.tmpl
templates/repo/issue/view_content/comments.tmpl