mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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() {
|
ListWidget::~ListWidget() {
|
||||||
// Destroy child widgets first, because they may invoke leaveEvent-s.
|
// Destroy child widgets first, because they may invoke leaveEvent-s.
|
||||||
_emptyInfo = nullptr;
|
_emptyInfo = nullptr;
|
||||||
|
if (const auto raw = _menu.release()) {
|
||||||
|
crl::on_main(raw, [=] {
|
||||||
|
delete raw;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfirmDeleteSelectedItems(not_null<ListWidget*> widget) {
|
void ConfirmDeleteSelectedItems(not_null<ListWidget*> widget) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue