mirror of
https://github.com/matrix-org/dendrite
synced 2024-11-10 07:04:24 +00:00
Fix panic in roomserver
This commit is contained in:
parent
3a77bca28b
commit
5357df36c9
1 changed files with 1 additions and 1 deletions
|
@ -156,7 +156,7 @@ func (d *Database) AddState(
|
|||
stateBlockNIDs []types.StateBlockNID,
|
||||
state []types.StateEntry,
|
||||
) (stateNID types.StateSnapshotNID, err error) {
|
||||
if len(stateBlockNIDs) > 0 {
|
||||
if len(stateBlockNIDs) > 0 && len(state) > 0 {
|
||||
// Check to see if the event already appears in any of the existing state
|
||||
// blocks. If it does then we should not add it again, as this will just
|
||||
// result in excess state blocks and snapshots.
|
||||
|
|
Loading…
Reference in a new issue