mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Fix nil pointer dereference error when open link with invalid pull index (#26353)
fix #26331 Before:  After: 
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user