Recover from panics in event handlers

This commit is contained in:
Tulir Asokan
2019-06-18 08:24:17 +03:00
parent 45e60c2510
commit 2023f55f32
3 changed files with 15 additions and 5 deletions

View File

@ -1198,7 +1198,7 @@ func (portal *Portal) HandleMatrixRedaction(sender *User, evt *mautrix.Event) {
}
msg := portal.bridge.DB.Message.GetByMXID(evt.Redacts)
if msg.Sender != sender.JID {
if msg == nil || msg.Sender != sender.JID {
return
}