Fix update_message.
GitOrigin-RevId: a3b2cce00a5188328cc577896eceb8bfe130b5f8
This commit is contained in:
parent
ac8b30f6e6
commit
1902a5f0e6
@ -22395,8 +22395,9 @@ void MessagesManager::update_message(Dialog *d, unique_ptr<Message> &old_message
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (old_message->reply_to_message_id != new_message->reply_to_message_id) {
|
if (old_message->reply_to_message_id != new_message->reply_to_message_id) {
|
||||||
if (new_message->reply_to_message_id == MessageId() &&
|
// Can't check "&& get_message_force(d, old_message->reply_to_message_id) == nullptr", because it
|
||||||
get_message_force(d, old_message->reply_to_message_id) == nullptr) {
|
// can change message tree and invalidate reference to old_message
|
||||||
|
if (new_message->reply_to_message_id == MessageId()) {
|
||||||
old_message->reply_to_message_id = MessageId();
|
old_message->reply_to_message_id = MessageId();
|
||||||
is_changed = true;
|
is_changed = true;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user