mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-17 22:57:11 +02:00
Fix possible crash in ListWidget destructor.
This commit is contained in:
parent
603aa5db5f
commit
aa445adfff
1 changed files with 5 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue