From 1e15dbfbdca1d5210f8f08fefc051d5896889fff Mon Sep 17 00:00:00 2001 From: Daishan Peng Date: Mon, 22 Jan 2018 15:44:51 -0700 Subject: [PATCH] fix nil pointer exceptions --- condition/condition.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/condition/condition.go b/condition/condition.go index 00d927c6..89b377fd 100644 --- a/condition/condition.go +++ b/condition/condition.go @@ -216,6 +216,9 @@ func findCond(val reflect.Value, name string) *reflect.Value { } func getValue(obj interface{}, name ...string) reflect.Value { + if obj == nil { + return reflect.Value{} + } v := reflect.ValueOf(obj) t := v.Type() if t.Kind() == reflect.Ptr {