mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-29 05:29:23 +00:00
Fix crash in history clear.
This commit is contained in:
parent
60e36b1411
commit
cc8f4aa24f
@ -2947,8 +2947,8 @@ void History::clear(ClearType type) {
|
||||
changeUnreadCount(-unreadCount());
|
||||
if (type == ClearType::DeleteChat) {
|
||||
setLastMessage(nullptr);
|
||||
} else {
|
||||
if (_lastMessage && IsServerMsgId((*_lastMessage)->id)) {
|
||||
} else if (_lastMessage && *_lastMessage) {
|
||||
if (IsServerMsgId((*_lastMessage)->id)) {
|
||||
(*_lastMessage)->applyEditionToHistoryCleared();
|
||||
} else {
|
||||
_lastMessage = std::nullopt;
|
||||
|
Loading…
x
Reference in New Issue
Block a user