mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-29 14:18:49 +03:00
Fix crash on empty image packs
This commit is contained in:
parent
eb33c9a225
commit
fd6742ec00
1 changed files with 1 additions and 1 deletions
|
@ -2310,7 +2310,7 @@ TimelineModel::formatImagePackEvent(const QString &id)
|
||||||
|
|
||||||
auto sender = utils::replaceEmoji(displayName(QString::fromStdString(event->sender)));
|
auto sender = utils::replaceEmoji(displayName(QString::fromStdString(event->sender)));
|
||||||
const auto packId = [&event]() -> QString {
|
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();
|
return event->content.pack->display_name.c_str();
|
||||||
} else if (!event->state_key.empty()) {
|
} else if (!event->state_key.empty()) {
|
||||||
return event->state_key.c_str();
|
return event->state_key.c_str();
|
||||||
|
|
Loading…
Reference in a new issue