mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-02-22 10:54:27 -06:00
Check nils more
This commit is contained in:
parent
7246580d54
commit
613a47354f
|
@ -365,7 +365,7 @@ func (oq *destinationQueue) nextTransaction(
|
||||||
// Go through PDUs that we retrieved from the database, if any,
|
// Go through PDUs that we retrieved from the database, if any,
|
||||||
// and add them into the transaction.
|
// and add them into the transaction.
|
||||||
for _, pdu := range pdus {
|
for _, pdu := range pdus {
|
||||||
if pdu.pdu == nil {
|
if pdu == nil || pdu.pdu == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
// Append the JSON of the event, since this is a json.RawMessage type in the
|
// 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.
|
// Do the same for pending EDUS in the queue.
|
||||||
for _, edu := range edus {
|
for _, edu := range edus {
|
||||||
if edu.edu == nil {
|
if edu == nil || edu.edu == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
t.EDUs = append(t.EDUs, *edu.edu)
|
t.EDUs = append(t.EDUs, *edu.edu)
|
||||||
|
|
Loading…
Reference in a new issue