Fix crash in window destruction.

This commit is contained in:
John Preston 2019-08-27 20:25:04 +03:00
parent 149c69809d
commit 9e3bc966c8
2 changed files with 1 additions and 3 deletions

View file

@ -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();

View file

@ -265,7 +265,6 @@ bool MainWindow::hideNoQuit() {
}
void MainWindow::clearWidgets() {
Ui::hideLayer(anim::type::instant);
clearWidgetsHook();
updateGlobalMenu();
}