From 317b4dbffb77b783de6fa9a56bc65a791dabb61f Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 2 May 2022 15:47:35 +0300 Subject: [PATCH] Fix panic in requesting retries --- historysync.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/historysync.go b/historysync.go index 213a2e3..137ee7c 100644 --- a/historysync.go +++ b/historysync.go @@ -527,7 +527,7 @@ func (portal *Portal) backfill(source *User, messages []*waProto.WebMessageInfo, func (portal *Portal) requestMediaRetries(source *User, infos []*wrappedInfo) { for _, info := range infos { - if info.Error == database.MsgErrMediaNotFound && info.MediaKey != nil { + if info != nil && info.Error == database.MsgErrMediaNotFound && info.MediaKey != nil { err := source.Client.SendMediaRetryReceipt(info.MessageInfo, info.MediaKey) if err != nil { portal.log.Warnfln("Failed to send post-backfill media retry request for %s: %v", info.ID, err)