From 6ae1c92c1db727db5ee78e697aeef0295e760f6c Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Mon, 31 Aug 2020 10:26:42 -0400 Subject: [PATCH] stage-3: fix nil dereference --- gitsrht-update-hook/stage-3.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitsrht-update-hook/stage-3.go b/gitsrht-update-hook/stage-3.go index 00b4866..9320029 100644 --- a/gitsrht-update-hook/stage-3.go +++ b/gitsrht-update-hook/stage-3.go @@ -136,7 +136,7 @@ func deleteArtifacts(ctx *PushContext, db *sql.DB, payload *WebhookPayload) { } for _, ref := range payload.Refs { - if ref.New != nil { + if ref.New != nil || ref.Old == nil { continue } -- 2.38.4