diff --git a/Telegram/SourceFiles/boxes/peer_list_box.cpp b/Telegram/SourceFiles/boxes/peer_list_box.cpp index 1b1b6cb169..3d89e7caac 100644 --- a/Telegram/SourceFiles/boxes/peer_list_box.cpp +++ b/Telegram/SourceFiles/boxes/peer_list_box.cpp @@ -1564,3 +1564,9 @@ void PeerListContent::handleNameChanged(const Notify::PeerUpdate &update) { } } } + +PeerListContent::~PeerListContent() { + if (_contextMenu) { + _contextMenu->setDestroyedCallback(nullptr); + } +} diff --git a/Telegram/SourceFiles/boxes/peer_list_box.h b/Telegram/SourceFiles/boxes/peer_list_box.h index f1aeb88d8f..5a50a5d416 100644 --- a/Telegram/SourceFiles/boxes/peer_list_box.h +++ b/Telegram/SourceFiles/boxes/peer_list_box.h @@ -484,6 +484,8 @@ public: return _scrollToRequests.events(); } + ~PeerListContent(); + protected: int resizeGetHeight(int newWidth) override; void visibleTopBottomUpdated(