Skip to content

Commit

Permalink
ensure framer exists before accessing customPayload
Browse files Browse the repository at this point in the history
  • Loading branch information
Burk, Adam committed Jun 9, 2020
1 parent cb62e19 commit 8812a33
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,4 @@ Pavel Buchinchik <p.buchinchik@gmail.com>
Rintaro Okamura <rintaro.okamura@gmail.com>
Yura Sokolov <y.sokolov@joom.com>; <funny.falcon@gmail.com>
Jorge Bay <jorgebg@apache.org>
Adam Burk <amburk@gmail.com>
5 changes: 4 additions & 1 deletion session.go
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,10 @@ func (iter *Iter) Scan(dest ...interface{}) bool {
// custom QueryHandlers running in your C* cluster.
// See https://datastax.github.io/java-driver/manual/custom_payloads/
func (iter *Iter) GetCustomPayload() map[string][]byte {
return iter.framer.customPayload
if iter.framer != nil {
return iter.framer.customPayload
}
return nil
}

// Warnings returns any warnings generated if given in the response from Cassandra.
Expand Down

0 comments on commit 8812a33

Please sign in to comment.