Skip to content

Commit 0a11bce

Browse files
authored
Fix Null Pointer error for CommitStatusesHideActionsURL (#31731)
Fix #30156 (comment) Forgot fixing it in #31719
1 parent f989f46 commit 0a11bce

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

models/git/commit_status.go

+4
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,10 @@ func ConvertFromGitCommit(ctx context.Context, commits []*git.Commit, repo *repo
541541
func CommitStatusesHideActionsURL(ctx context.Context, statuses []*CommitStatus) {
542542
idToRepos := make(map[int64]*repo_model.Repository)
543543
for _, status := range statuses {
544+
if status == nil {
545+
continue
546+
}
547+
544548
if status.Repo == nil {
545549
status.Repo = idToRepos[status.RepoID]
546550
}

0 commit comments

Comments
 (0)