mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Fix UB in closing chat across all windows.
This commit is contained in:
parent
e01910ac68
commit
aa674a0ea5
1 changed files with 1 additions and 3 deletions
|
@ -1205,11 +1205,9 @@ void Application::closeWindow(not_null<Window::Controller*> window) {
|
|||
|
||||
void Application::closeChatFromWindows(not_null<PeerData*> peer) {
|
||||
for (const auto &[history, window] : _secondaryWindows) {
|
||||
if (!window) {
|
||||
continue;
|
||||
}
|
||||
if (history->peer == peer) {
|
||||
closeWindow(window.get());
|
||||
break;
|
||||
} else if (const auto session = window->sessionController()) {
|
||||
if (session->activeChatCurrent().peer() == peer) {
|
||||
session->showPeerHistory(
|
||||
|
|
Loading…
Add table
Reference in a new issue