Don't crash when editing pending message
This commit is contained in:
@@ -1488,8 +1488,11 @@ QString NeoChatRoom::chatBoxEditMessage() const
|
|||||||
|
|
||||||
EventHandler eventhandler;
|
EventHandler eventhandler;
|
||||||
eventhandler.setRoom(this);
|
eventhandler.setRoom(this);
|
||||||
eventhandler.setEvent(&**findInTimeline(m_chatBoxEditId));
|
if (auto event = findInTimeline(m_chatBoxEditId); event != historyEdge()) {
|
||||||
return eventhandler.getPlainBody();
|
eventhandler.setEvent(&**event);
|
||||||
|
return eventhandler.getPlainBody();
|
||||||
|
}
|
||||||
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
QString NeoChatRoom::chatBoxAttachmentPath() const
|
QString NeoChatRoom::chatBoxAttachmentPath() const
|
||||||
|
|||||||
Reference in New Issue
Block a user