diff --git a/models/git/commit_status.go b/models/git/commit_status.go index 422cf0b4ee..53d1ddc8c3 100644 --- a/models/git/commit_status.go +++ b/models/git/commit_status.go @@ -506,6 +506,10 @@ func ConvertFromGitCommit(ctx context.Context, commits []*git.Commit, repo *repo func CommitStatusesHideActionsURL(ctx context.Context, statuses []*CommitStatus) { idToRepos := make(map[int64]*repo_model.Repository) for _, status := range statuses { + if status == nil { + continue + } + if status.Repo == nil { status.Repo = idToRepos[status.RepoID] }