Ensure the last bubble component has a link before loading the URL preview.

This commit is contained in:
Doug
2021-09-13 16:49:34 +01:00
parent 0e20bf5038
commit 9029aaecda
2 changed files with 2 additions and 1 deletions
@@ -1076,7 +1076,7 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
{
// Get the last bubble component as that contains the link.
MXKRoomBubbleComponent *lastComponent = bubbleComponents.lastObject;
if (!lastComponent)
if (!lastComponent || !lastComponent.link)
{
return;
}