Fix crash on empty image packs

pull/1123/head
Nicolas Werner 2 years ago
parent eb33c9a225
commit fd6742ec00
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 2
      src/timeline/TimelineModel.cpp

@ -2310,7 +2310,7 @@ TimelineModel::formatImagePackEvent(const QString &id)
auto sender = utils::replaceEmoji(displayName(QString::fromStdString(event->sender)));
const auto packId = [&event]() -> QString {
if (!event->content.pack->display_name.empty()) {
if (event->content.pack && !event->content.pack->display_name.empty()) {
return event->content.pack->display_name.c_str();
} else if (!event->state_key.empty()) {
return event->state_key.c_str();

Loading…
Cancel
Save