2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Fix possible crash in messages forwarding.

Regression was introduced in 2c1e7bfcb6.
This commit is contained in:
John Preston
2023-03-17 19:24:48 +04:00
parent 2635b35b74
commit f66e6879c2
2 changed files with 11 additions and 6 deletions

View File

@@ -1656,7 +1656,11 @@ QPointer<Ui::BoxContent> ShowForwardMessagesBox(
not_null<Window::SessionNavigation*> navigation,
Data::ForwardDraft &&draft,
Fn<void()> &&successCallback) {
const auto msgIds = draft.ids;
const auto owner = &navigation->session().data();
const auto msgIds = owner->itemsToIds(owner->idsToItems(draft.ids));
if (msgIds.empty()) {
return nullptr;
}
class ListBox final : public PeerListBox {
public: