mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
Fix UB in closing chat across all windows.
This commit is contained in:
@@ -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(
|
||||
|
Reference in New Issue
Block a user