Fix null pointer with invalid argument values
This commit is contained in:
parent
5edcf7b3a9
commit
7c37a1ef63
@ -423,6 +423,10 @@ func (com *Compiler) compileArgNode(val *Node) (*Exp, error) {
|
||||
st := util.NewStack()
|
||||
var root *Exp
|
||||
|
||||
if val == nil || len(val.Children) == 0 {
|
||||
return nil, errors.New("invalid argument value")
|
||||
}
|
||||
|
||||
st.Push(&expT{nil, val.Children[0]})
|
||||
|
||||
for {
|
||||
|
Loading…
Reference in New Issue
Block a user