1
0
forked from gitea/gitea
zeripath 1062931cf1
Prevent NPE in CommentMustAsDiff if no hunk header () ()
Backport 

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 

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-04-01 14:30:44 -04:00
..