Skip to content

Commit

Permalink
Merge pull request #840 from vrischmann/fix-warnings
Browse files Browse the repository at this point in the history
check that the framer exists before trying to access the warnings
  • Loading branch information
Zariel committed Nov 25, 2016
2 parents a6c0f87 + b0b4cc3 commit 5f4a76e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion session.go
Expand Up @@ -1238,7 +1238,10 @@ func (iter *Iter) GetCustomPayload() map[string][]byte {
//
// This is only available starting with CQL Protocol v4.
func (iter *Iter) Warnings() []string {
return iter.framer.header.warnings
if iter.framer != nil {
return iter.framer.header.warnings
}
return nil
}

// Close closes the iterator and returns any errors that happened during
Expand Down

0 comments on commit 5f4a76e

Please sign in to comment.