Skip to content

Commit 8812a33

Browse files
author
Burk, Adam
committed
ensure framer exists before accessing customPayload
1 parent cb62e19 commit 8812a33

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,4 @@ Pavel Buchinchik <[email protected]>
115115
Rintaro Okamura <[email protected]>
116116
117117
Jorge Bay <[email protected]>
118+
Adam Burk <[email protected]>

session.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1463,7 +1463,10 @@ func (iter *Iter) Scan(dest ...interface{}) bool {
14631463
// custom QueryHandlers running in your C* cluster.
14641464
// See https://datastax.github.io/java-driver/manual/custom_payloads/
14651465
func (iter *Iter) GetCustomPayload() map[string][]byte {
1466-
return iter.framer.customPayload
1466+
if iter.framer != nil {
1467+
return iter.framer.customPayload
1468+
}
1469+
return nil
14671470
}
14681471

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

0 commit comments

Comments
 (0)