Fix two null pointer dereferences

This commit is contained in:
Kevin Wolf
2023-02-20 19:00:54 +00:00
committed by Tobias Fella
parent 2dd3197beb
commit 084b89f3dc
2 changed files with 7 additions and 1 deletions

View File

@@ -975,6 +975,9 @@ QVariant MessageEventModel::getLatestMessageFromIndex(const int baseline)
for (auto it = timelineBottom; it != limit; ++it) {
auto evt = it->event();
auto e = eventCast<const RoomMessageEvent>(evt);
if (!e) {
continue;
}
auto content = (*it)->contentJson();