mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Fix possible crash in ListWidget destructor.
This commit is contained in:
@@ -4277,6 +4277,11 @@ void ListWidget::overrideIsChatWide(bool isWide) {
|
||||
ListWidget::~ListWidget() {
|
||||
// Destroy child widgets first, because they may invoke leaveEvent-s.
|
||||
_emptyInfo = nullptr;
|
||||
if (const auto raw = _menu.release()) {
|
||||
crl::on_main(raw, [=] {
|
||||
delete raw;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void ConfirmDeleteSelectedItems(not_null<ListWidget*> widget) {
|
||||
|
||||
Reference in New Issue
Block a user