diff --git a/Telegram/SourceFiles/info/info_layer_widget.cpp b/Telegram/SourceFiles/info/info_layer_widget.cpp index 49e0c74f94..c5aea6f2bd 100644 --- a/Telegram/SourceFiles/info/info_layer_widget.cpp +++ b/Telegram/SourceFiles/info/info_layer_widget.cpp @@ -265,7 +265,9 @@ void LayerWidget::closeHook() { } LayerWidget::~LayerWidget() { - restoreFloatPlayerDelegate(); + if (!App::quitting()) { + restoreFloatPlayerDelegate(); + } } } // namespace Info diff --git a/Telegram/SourceFiles/mainwindow.cpp b/Telegram/SourceFiles/mainwindow.cpp index 5d71547658..b1efaba008 100644 --- a/Telegram/SourceFiles/mainwindow.cpp +++ b/Telegram/SourceFiles/mainwindow.cpp @@ -904,7 +904,6 @@ void MainWindow::updateIsActiveHook() { } MainWindow::~MainWindow() { - ui_hideSettingsAndLayer(anim::type::instant); if (_clearManager) { _clearManager->stop(); _clearManager = nullptr; diff --git a/Telegram/SourceFiles/window/layer_widget.cpp b/Telegram/SourceFiles/window/layer_widget.cpp index 6cf87ab4fc..66fa140bf7 100644 --- a/Telegram/SourceFiles/window/layer_widget.cpp +++ b/Telegram/SourceFiles/window/layer_widget.cpp @@ -400,16 +400,11 @@ void LayerStackWidget::hideLayers(anim::type animated) { } void LayerStackWidget::hideAll(anim::type animated) { - const auto clear = [=] { + startAnimation([] {}, [=] { clearLayers(); clearSpecialLayer(); _mainMenu.destroyDelayed(); - }; - if (App::quitting()) { - clear(); - } else { - startAnimation([] {}, clear, Action::HideAll, animated); - } + }, Action::HideAll, animated); } void LayerStackWidget::hideTopLayer(anim::type animated) {