Fix crash and add more logging

This commit is contained in:
Tulir Asokan
2019-05-31 20:51:16 +03:00
parent a40584db41
commit 83f4cf2811
2 changed files with 7 additions and 1 deletions

View File

@ -358,7 +358,7 @@ func (handler *CommandHandler) CommandDeleteAllPortals(ce *CommandEvent) {
}
}
customPuppet := handler.bridge.GetPuppetByCustomMXID(ce.User.MXID)
if customPuppet != nil {
if customPuppet != nil && customPuppet.CustomIntent() != nil {
intent := customPuppet.CustomIntent()
leave = func(portal *Portal) {
if len(portal.MXID) > 0 {