Skip to content

Commit

Permalink
check the result is not nil
Browse files Browse the repository at this point in the history
  • Loading branch information
flike committed May 3, 2017
1 parent 8b29b42 commit 14071df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions core/hack/version.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package hack

const (
Version = "2017-03-05 11:28:16 +0800 @9e216ed"
Compile = "2017-04-02 07:55:14 +0800 by go version go1.8 darwin/amd64"
Version = "2017-04-25 19:26:47 +0800 @8b29b42"
Compile = "2017-05-03 19:55:36 +0800 by go version go1.8 darwin/amd64"
)
12 changes: 7 additions & 5 deletions proxy/server/conn_select.go
Original file line number Diff line number Diff line change
Expand Up @@ -710,12 +710,14 @@ func (c *ClientConn) calFuncExprValue(funcName string,
return nil, nil
}
for _, r := range rs {
for k := range r.Values {
result, err := r.GetInt(k, index)
if err != nil {
return nil, err
if r != nil {
for k := range r.Values {
result, err := r.GetInt(k, index)
if err != nil {
return nil, err
}
num += result
}
num += result
}
}
return num, nil
Expand Down

0 comments on commit 14071df

Please sign in to comment.