From 613a47354f1688c00dde6d7f0b647a45a170023e Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Mon, 7 Dec 2020 10:49:06 +0000 Subject: [PATCH] Check nils more --- federationsender/queue/destinationqueue.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/federationsender/queue/destinationqueue.go b/federationsender/queue/destinationqueue.go index ae1a3e9ee..7651f7a7f 100644 --- a/federationsender/queue/destinationqueue.go +++ b/federationsender/queue/destinationqueue.go @@ -365,7 +365,7 @@ func (oq *destinationQueue) nextTransaction( // Go through PDUs that we retrieved from the database, if any, // and add them into the transaction. for _, pdu := range pdus { - if pdu.pdu == nil { + if pdu == nil || pdu.pdu == nil { continue } // Append the JSON of the event, since this is a json.RawMessage type in the @@ -376,7 +376,7 @@ func (oq *destinationQueue) nextTransaction( // Do the same for pending EDUS in the queue. for _, edu := range edus { - if edu.edu == nil { + if edu == nil || edu.edu == nil { continue } t.EDUs = append(t.EDUs, *edu.edu)