From 104ee2da57e0024595ebb26b43eedac09cc4acc1 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 3 Jul 2023 17:09:26 +0300 Subject: [PATCH] Fix panic if lottieconverter isn't installed --- portal_convert.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/portal_convert.go b/portal_convert.go index 0f04a2f..f0148a1 100644 --- a/portal_convert.go +++ b/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