From 557c053197184c68323941a7bd854111d8d43ce6 Mon Sep 17 00:00:00 2001 From: Mrs4s <1844812067@qq.com> Date: Sun, 28 Mar 2021 13:32:12 +0800 Subject: [PATCH] fix sync nil pointer. --- client/sync.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/sync.go b/client/sync.go index a53981b0..a0812e47 100644 --- a/client/sync.go +++ b/client/sync.go @@ -380,7 +380,10 @@ func decodeMsgSyncResponse(c *QQClient, info *incomingPacketInfo, payload []byte var latest []*message.GroupMessage for _, m := range gmRsp.Msg { if m.Head.GetFromUin() != 0 { - latest = append(latest, c.parseGroupMessage(m)) + pm := c.parseGroupMessage(m) + if pm != nil { + latest = append(latest, pm) + } } } ret.GroupSessions = append(ret.GroupSessions, &GroupSessionInfo{