diff --git a/Telegram/SourceFiles/window/window_peer_menu.cpp b/Telegram/SourceFiles/window/window_peer_menu.cpp index 99daf3c38f..ce1cb9cc9b 100644 --- a/Telegram/SourceFiles/window/window_peer_menu.cpp +++ b/Telegram/SourceFiles/window/window_peer_menu.cpp @@ -667,9 +667,10 @@ void Filler::addDeleteContact() { if (!user || !user->isContact() || user->isSelf()) { return; } + const auto controller = _controller; _addAction( tr::lng_info_delete_contact(tr::now), - [=] { PeerMenuDeleteContact(_controller, user); }, + [=] { PeerMenuDeleteContact(controller, user); }, &st::menuIconDelete); }