Only try to display images if they exist

This commit is contained in:
Loren Burkholder 2021-03-01 20:07:53 -05:00 committed by Nicolas Werner
parent 82bbdfb929
commit 64dd10a6a0
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
3 changed files with 14 additions and 7 deletions

View file

@ -58,6 +58,6 @@ NotificationsManager::postNotification(const mtx::responses::Notification &notif
const QString messageInfo =
(isReply ? tr("%1 replied to a message") : tr("%1 sent a message")).arg(sender);
objCxxPostNotification(
room_name, messageInfo, formatNotification(notification), image);
room_name, messageInfo, formatNotification(notification), (image != nullptr && !image->isNull()) ? image : nullptr);
}
}