Fix crash in Update-requested-by-tg://-link.

This commit is contained in:
John Preston 2021-08-23 13:54:49 +03:00
parent 2b04653f24
commit 70b3e414ce

View file

@ -281,7 +281,8 @@ void ConfirmBox::confirmed() {
} }
} else if (const auto callbackPtr = std::get_if<2>(confirmed)) { } else if (const auto callbackPtr = std::get_if<2>(confirmed)) {
if (auto callback = base::take(*callbackPtr)) { if (auto callback = base::take(*callbackPtr)) {
callback([=] { closeBox(); }); const auto weak = Ui::MakeWeak(this);
callback(crl::guard(weak, [=] { closeBox(); }));
} }
} }
} }