From 9e3bc966c84abc43a3979a6913e8486ada69f05a Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 27 Aug 2019 20:25:04 +0300 Subject: [PATCH] Fix crash in window destruction. --- Telegram/SourceFiles/mainwindow.cpp | 3 +-- Telegram/SourceFiles/window/main_window.cpp | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/mainwindow.cpp b/Telegram/SourceFiles/mainwindow.cpp index 1dbb4594c..04c98fcff 100644 --- a/Telegram/SourceFiles/mainwindow.cpp +++ b/Telegram/SourceFiles/mainwindow.cpp @@ -151,6 +151,7 @@ void MainWindow::firstShow() { void MainWindow::clearWidgetsHook() { Expects(_passcodeLock == nullptr || !Global::LocalPasscode()); + destroyLayer(); _main.destroy(); _passcodeLock.destroy(); _intro.destroy(); @@ -207,8 +208,6 @@ void MainWindow::clearPasscodeLock() { } void MainWindow::setupIntro() { - Ui::hideSettingsAndLayer(anim::type::instant); - auto animated = (_main || _passcodeLock); auto bg = animated ? grabInner() : QPixmap(); diff --git a/Telegram/SourceFiles/window/main_window.cpp b/Telegram/SourceFiles/window/main_window.cpp index 4644d3b8e..902d84d01 100644 --- a/Telegram/SourceFiles/window/main_window.cpp +++ b/Telegram/SourceFiles/window/main_window.cpp @@ -265,7 +265,6 @@ bool MainWindow::hideNoQuit() { } void MainWindow::clearWidgets() { - Ui::hideLayer(anim::type::instant); clearWidgetsHook(); updateGlobalMenu(); }