Fix reaction update event when the event is not there anymore

Happens when interacting witht Mjonir quite often
This commit is contained in:
Carl Schwan
2024-02-15 16:55:20 +01:00
parent 15084459bb
commit 6d3839dd42

View File

@@ -23,7 +23,7 @@ ReactionModel::ReactionModel(const Quotient::RoomMessageEvent *event, const NeoC
{
if (m_event != nullptr && m_room != nullptr) {
connect(m_room, &NeoChatRoom::updatedEvent, this, [this](const QString &eventId) {
if (m_event->id() == eventId) {
if (m_event && m_event->id() == eventId) {
updateReactions();
}
});