mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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;
|
_data = data;
|
||||||
if (!_data.valid) {
|
if (!_data.valid) {
|
||||||
_text = {};
|
_text = {};
|
||||||
|
_clickHandlerLifetime.destroy();
|
||||||
|
_userpicsLifetime.destroy();
|
||||||
_userpics = nullptr;
|
_userpics = nullptr;
|
||||||
_widget = nullptr;
|
_widget = nullptr;
|
||||||
return;
|
return;
|
||||||
|
@ -305,6 +307,8 @@ void RecentViews::showMenu() {
|
||||||
_controller->setMenuShown(true);
|
_controller->setMenuShown(true);
|
||||||
_menu->setDestroyedCallback(crl::guard(_widget.get(), [=] {
|
_menu->setDestroyedCallback(crl::guard(_widget.get(), [=] {
|
||||||
_controller->setMenuShown(false);
|
_controller->setMenuShown(false);
|
||||||
|
_waitingForUserpicsLifetime.destroy();
|
||||||
|
_waitingForUserpics.clear();
|
||||||
_menuShortLifetime.destroy();
|
_menuShortLifetime.destroy();
|
||||||
_menuEntries.clear();
|
_menuEntries.clear();
|
||||||
_menuEntriesCount = 0;
|
_menuEntriesCount = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue