Explorar el Código

Fix panic if lottieconverter isn't installed

Tulir Asokan hace 2 años
padre
commit
104ee2da57
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      portal_convert.go

+ 3 - 0
portal_convert.go

@@ -82,6 +82,9 @@ func (portal *Portal) convertDiscordFile(ctx context.Context, typeName string, i
 }
 
 func (portal *Portal) cleanupConvertedStickerInfo(content *event.MessageEventContent) {
+	if content.Info == nil {
+		return
+	}
 	if content.Info.Width == 0 && content.Info.Height == 0 {
 		content.Info.Width = DiscordStickerSize
 		content.Info.Height = DiscordStickerSize