Don't access event after it was deleted

- NeoChat stores pointer to event
- Event is replaced
- libQuotient deletes the event and notifies us that the event changes
- We're accessing the event to check its id
- Boom

Make this not boom by accessing the ID that we're additionally storing anyway.
This commit is contained in:
Tobias Fella
2024-07-02 19:08:59 +02:00
parent c48b9874bf
commit d91ed535ad
2 changed files with 16 additions and 14 deletions

View File

@@ -114,6 +114,7 @@ Q_SIGNALS:
private:
QPointer<NeoChatRoom> m_room;
QString m_eventId;
QString m_eventSenderId;
const Quotient::RoomEvent *m_event = nullptr;
bool m_isPending;