mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-23 14:53:10 -06:00
Fix nil panic on caching roominfo
This commit is contained in:
parent
c2f4a78587
commit
e18a037930
|
|
@ -127,7 +127,7 @@ func (d *Database) RoomInfo(ctx context.Context, roomID string) (*types.RoomInfo
|
|||
return &info, nil
|
||||
}
|
||||
info, err := d.RoomsTable.SelectRoomInfo(ctx, roomID)
|
||||
if err == nil {
|
||||
if err == nil && info != nil {
|
||||
d.Cache.StoreRoomInfo(roomID, *info)
|
||||
}
|
||||
return info, err
|
||||
|
|
|
|||
Loading…
Reference in a new issue