0
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-29 23:06:19 +01:00
gitea/services
zeripath a351b22dc0
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>
2021-04-01 14:29:14 -04:00
..
archiver
comments
externalaccount
gitdiff Prevent NPE in CommentMustAsDiff if no hunk header (#15199) 2021-04-01 14:29:14 -04:00
issue
mailer Repository transfer has to be confirmed, if user can not create repo for new owner (#14792) 2021-03-01 01:47:30 +01:00
mirror
pull IsUserAllowedToUpdate ignore igonre if user is nil (#14885) 2021-03-04 19:27:54 +01:00
release Implement delete release attachments and update release attachments' name (#14130) 2021-03-23 00:09:51 +08:00
repository Repository transfer has to be confirmed, if user can not create repo for new owner (#14792) 2021-03-01 01:47:30 +01:00
webhook Migrate to use jsoniter instead of encoding/json (#14841) 2021-03-01 22:08:10 +01:00
wiki