Skip to content

Commit

Permalink
prevent panic on nil pagination (keybase#24316)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshblum authored Sep 14, 2020
1 parent 2687c29 commit 38f703e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go/chat/attachments/gallery.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ func (g *Gallery) NextMessages(ctx context.Context, uid gregor1.UID,
}
}
g.Debug(ctx, "NextMessages: still need more (%d < %d): len: %d", len(res), num, len(tv.Messages))
if tv.Pagination.Last {
if tv.Pagination == nil || tv.Pagination.Last {
g.Debug(ctx, "NextMessages: stopping on last page")
break
}
Expand Down

0 comments on commit 38f703e

Please sign in to comment.