diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index cba0b6e908..2ea66d0d4c 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -3739,9 +3739,10 @@ void HistoryWidget::handleSupportSwitch(not_null updated) { return; } - crl::on_main( - this, - Support::GetSwitchMethod(Auth().settings().supportSwitch())); + const auto setting = Auth().settings().supportSwitch(); + if (auto method = Support::GetSwitchMethod(setting)) { + crl::on_main(this, std::move(method)); + } } void HistoryWidget::inlineBotResolveDone(