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
59ed41abfe
commit
2e94488eb4
1 changed files with 4 additions and 1 deletions
|
@ -3181,7 +3181,10 @@ void ListWidget::setEmptyInfoWidget(base::unique_qptr<Ui::RpWidget> &&w) {
|
||||||
_emptyInfo = std::move(w);
|
_emptyInfo = std::move(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
ListWidget::~ListWidget() = default;
|
ListWidget::~ListWidget() {
|
||||||
|
// Destroy child widgets first, because they may invoke leaveEvent-s.
|
||||||
|
_emptyInfo = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
void ConfirmDeleteSelectedItems(not_null<ListWidget*> widget) {
|
void ConfirmDeleteSelectedItems(not_null<ListWidget*> widget) {
|
||||||
const auto items = widget->getSelectedItems();
|
const auto items = widget->getSelectedItems();
|
||||||
|
|
Loading…
Add table
Reference in a new issue