mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Fix possible crash in views refresh.
This commit is contained in:
parent
315b95a214
commit
2402285d03
1 changed files with 4 additions and 0 deletions
|
@ -136,6 +136,8 @@ void RecentViews::show(RecentViewsData data) {
|
|||
_data = data;
|
||||
if (!_data.valid) {
|
||||
_text = {};
|
||||
_clickHandlerLifetime.destroy();
|
||||
_userpicsLifetime.destroy();
|
||||
_userpics = nullptr;
|
||||
_widget = nullptr;
|
||||
return;
|
||||
|
@ -305,6 +307,8 @@ void RecentViews::showMenu() {
|
|||
_controller->setMenuShown(true);
|
||||
_menu->setDestroyedCallback(crl::guard(_widget.get(), [=] {
|
||||
_controller->setMenuShown(false);
|
||||
_waitingForUserpicsLifetime.destroy();
|
||||
_waitingForUserpics.clear();
|
||||
_menuShortLifetime.destroy();
|
||||
_menuEntries.clear();
|
||||
_menuEntriesCount = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue