diff --git a/Telegram/SourceFiles/window/main_window.cpp b/Telegram/SourceFiles/window/main_window.cpp index 8fe85f3973..fa177a3e08 100644 --- a/Telegram/SourceFiles/window/main_window.cpp +++ b/Telegram/SourceFiles/window/main_window.cpp @@ -705,6 +705,17 @@ void MainWindow::launchDrag(std::unique_ptr data) { MainWindow::~MainWindow() { _title.destroy(); + + // Otherwise: + // ~QWidget + // QWidgetPrivate::close_helper + // QWidgetPrivate::setVisible + // QWidgetPrivate::hide_helper + // QWidgetPrivate::hide_sys + // QWindowPrivate::setVisible + // QMetaObject::activate + // Window::MainWindow::handleVisibleChanged on a destroyed MainWindow. + hide(); } } // namespace Window