Don't crash when sticker pack room doesn't exist
BUG: 476923
This commit is contained in:
@@ -102,6 +102,9 @@ void ImagePacksModel::reloadImages()
|
|||||||
}
|
}
|
||||||
auto packs = rooms[roomId].toObject();
|
auto packs = rooms[roomId].toObject();
|
||||||
const auto &stickerRoom = m_room->connection()->room(roomId);
|
const auto &stickerRoom = m_room->connection()->room(roomId);
|
||||||
|
if (!stickerRoom) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
for (const auto &packKey : packs.keys()) {
|
for (const auto &packKey : packs.keys()) {
|
||||||
if (const auto &pack = stickerRoom->currentState().get<ImagePackEvent>(packKey)) {
|
if (const auto &pack = stickerRoom->currentState().get<ImagePackEvent>(packKey)) {
|
||||||
const auto packContent = pack->content();
|
const auto packContent = pack->content();
|
||||||
|
|||||||
Reference in New Issue
Block a user