From 048658f838cae36e5874c46ec0543a9f3ec02efc Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 9 Sep 2019 08:54:17 +0300 Subject: [PATCH] Fix deleting theme from the list. --- .../SourceFiles/window/themes/window_themes_cloud_list.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/window/themes/window_themes_cloud_list.cpp b/Telegram/SourceFiles/window/themes/window_themes_cloud_list.cpp index b04aaf077..684460e38 100644 --- a/Telegram/SourceFiles/window/themes/window_themes_cloud_list.cpp +++ b/Telegram/SourceFiles/window/themes/window_themes_cloud_list.cpp @@ -560,11 +560,11 @@ void CloudList::showMenu(Element &element) { _contextMenu->addAction(tr::lng_theme_delete(tr::now), [=] { const auto box = std::make_shared>(); const auto remove = [=] { + if (*box) { + (*box)->closeBox(); + } if (Background()->themeObject().cloud.id == id || id == kFakeCloudThemeId) { - if (*box) { - (*box)->closeBox(); - } if (Background()->editingTheme().has_value()) { Background()->clearEditingTheme( ClearEditing::KeepChanges);