Commit b198b994 authored by Russ Cox's avatar Russ Cox

do not crash on nil data value

R=r
DELTA=3  (3 added, 0 deleted, 0 changed)
OCL=34606
CL=34609
parent c5a441ac
......@@ -575,6 +575,9 @@ func (st *state) findVar(s string) reflect.Value {
for i := 0; i < len(elems); i++ {
// Look up field; data must be a struct.
data = reflect.Indirect(data);
if data == nil {
return nil
}
typ, ok := data.Type().(*reflect.StructType);
if !ok {
return nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment