Fix another imagepack crash
This commit is contained in:
@@ -83,10 +83,13 @@ void ImagePacksModel::setRoom(NeoChatRoom *room)
|
|||||||
const auto &stickerRoom = m_room->connection()->room(roomId);
|
const auto &stickerRoom = m_room->connection()->room(roomId);
|
||||||
for (const auto &packKey : packs.keys()) {
|
for (const auto &packKey : packs.keys()) {
|
||||||
#ifdef QUOTIENT_07
|
#ifdef QUOTIENT_07
|
||||||
const auto packContent = stickerRoom->currentState().get<ImagePackEvent>(packKey)->content();
|
const auto &pack = stickerRoom->currentState().get<ImagePackEvent>(packKey);
|
||||||
if (!packContent.pack->usage || (packContent.pack->usage->contains("emoticon") && showEmoticons())
|
if (pack) {
|
||||||
|| (packContent.pack->usage->contains("sticker") && showStickers())) {
|
const auto packContent = pack->content();
|
||||||
m_events += packContent;
|
if (!packContent.pack->usage || (packContent.pack->usage->contains("emoticon") && showEmoticons())
|
||||||
|
|| (packContent.pack->usage->contains("sticker") && showStickers())) {
|
||||||
|
m_events += packContent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user