diff options
author | zeripath <art27@cantab.net> | 2021-04-01 19:29:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-01 14:29:14 -0400 |
commit | a351b22dc0319a99ef68048529e533c7e91a9c8c (patch) | |
tree | cc0252f37489cf8c25ae4139cf0f38cf6c01dd2f /web_src | |
parent | ff460ca74d37b1eadac63b8858d0daa1690e0e2f (diff) | |
download | gitea-a351b22dc0319a99ef68048529e533c7e91a9c8c.tar.gz gitea-a351b22dc0319a99ef68048529e533c7e91a9c8c.zip |
Prevent NPE in CommentMustAsDiff if no hunk header (#15199)
I do not understand how this can happen or why.
There is an apparent possibility for a comment.Patch to be missing a hunk header
- this should not happen and do not understand how. But it appears to happen on
1.13 at least in some case.
This PR will simply add a new section if the cursection is empty
thus preventing the NPE.
Fix #15198
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'web_src')
0 files changed, 0 insertions, 0 deletions