From f7ecc2bee7eb62ad6bac2697ce5acc6a1767e415 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Tue, 14 Apr 2020 18:29:31 +0200 Subject: [PATCH] fix (#11066) --- services/pull/merge.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/pull/merge.go b/services/pull/merge.go index 2d4d9722e8..a20a214014 100644 --- a/services/pull/merge.go +++ b/services/pull/merge.go @@ -535,6 +535,9 @@ func IsSignedIfRequired(pr *models.PullRequest, doer *models.User) (bool, error) // IsUserAllowedToMerge check if user is allowed to merge PR with given permissions and branch protections func IsUserAllowedToMerge(pr *models.PullRequest, p models.Permission, user *models.User) (bool, error) { + if user == nil { + return false, nil + } err := pr.LoadProtectedBranch() if err != nil {