From be543f4005cf8a0f0db335d0928b9868d968592f Mon Sep 17 00:00:00 2001 From: Adnan Hajdarevic Date: Tue, 13 Jan 2015 02:47:04 +0100 Subject: [PATCH] possible null exception fix --- hooks/hooks.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/hooks.go b/hooks/hooks.go index 24509f1..6c2bb8e 100644 --- a/hooks/hooks.go +++ b/hooks/hooks.go @@ -126,7 +126,7 @@ func New(hookFile string) (*Hooks, error) { func (h *Hooks) Match(id string, params interface{}) *Hook { for i := range h.list { if h.list[i].ID == id { - if h.list[i].Rule.Evaluate(params) { + if h.list[i].Rule != nil && h.list[i].Rule.Evaluate(params) { return &h.list[i] } }