forked from forgejo/forgejo
Fix nil pointer dereference error when open link with invalid pull index (#26353)
fix #26331 Before:  After: 
This commit is contained in:
parent
049e400327
commit
24fbf4e059
2 changed files with 30 additions and 29 deletions
|
@ -259,8 +259,8 @@ type viewedFilesUpdate struct {
|
|||
|
||||
func UpdateViewedFiles(ctx *context.Context) {
|
||||
// Find corresponding PR
|
||||
issue := checkPullInfo(ctx)
|
||||
if ctx.Written() {
|
||||
issue, ok := getPullInfo(ctx)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
pull := issue.PullRequest
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue