浏览代码

Fix panic if lottieconverter isn't installed

Tulir Asokan 2 年之前
父节点
当前提交
104ee2da57
共有 1 个文件被更改,包括 3 次插入0 次删除
  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