From 3fc19d85b1038a6209dbfd06a4c6700259812d51 Mon Sep 17 00:00:00 2001 From: singuliere Date: Wed, 4 May 2022 01:35:34 +0100 Subject: [PATCH] loadRepoOwner must not attempt to use a nil action.Repo --- models/action_list.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/models/action_list.go b/models/action_list.go index c180a82552c5..609a8fc79121 100644 --- a/models/action_list.go +++ b/models/action_list.go @@ -80,6 +80,9 @@ func (actions ActionList) loadRepoOwner(e db.Engine, userMap map[int64]*user_mod } for _, action := range actions { + if action.Repo == nil { + continue + } repoOwner, ok := userMap[action.Repo.OwnerID] if !ok { repoOwner, err = user_model.GetUserByID(action.Repo.OwnerID)