Skip to content
This repository has been archived by the owner on Jul 5, 2020. It is now read-only.

Commit

Permalink
fix nil pointer dereference
Browse files Browse the repository at this point in the history
  • Loading branch information
thetinygoat committed May 31, 2020
1 parent 2b11ab2 commit cde07e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion list.go
Expand Up @@ -64,7 +64,7 @@ func (l *List) lpush(data string, response chan ChannelResponse) {
}

func (l *List) rpop(response chan ChannelResponse) {
if l.Size <= 0 {
if l.Head == nil {
response <- ChannelResponse{Data: nilString, Error: errors.New(listEmpty)}
} else {
rdata := l.Tail.Data
Expand Down

0 comments on commit cde07e6

Please sign in to comment.