Skip to content

Commit

Permalink
Fix Null Pointer error for CommitStatusesHideActionsURL (#31731)
Browse files Browse the repository at this point in the history
Fix #30156 (comment)

Forgot fixing it in #31719
  • Loading branch information
yp05327 authored Jul 30, 2024
1 parent f989f46 commit 0a11bce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions models/git/commit_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,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]
}
Expand Down

0 comments on commit 0a11bce

Please sign in to comment.