diff --git a/Telegram/SourceFiles/core/update_checker.cpp b/Telegram/SourceFiles/core/update_checker.cpp index 021da0cf5c..dabeddc360 100644 --- a/Telegram/SourceFiles/core/update_checker.cpp +++ b/Telegram/SourceFiles/core/update_checker.cpp @@ -1129,9 +1129,10 @@ void Updater::check() { void Updater::handleReady() { stop(); _action = Action::Ready; - - cSetLastUpdateCheck(unixtime()); - Local::writeSettings(); + if (!App::quitting()) { + cSetLastUpdateCheck(unixtime()); + Local::writeSettings(); + } } void Updater::handleFailed() { @@ -1156,10 +1157,11 @@ void Updater::handleProgress() { void Updater::scheduleNext() { stop(); - - cSetLastUpdateCheck(unixtime()); - Local::writeSettings(); - start(true); + if (!App::quitting()) { + cSetLastUpdateCheck(unixtime()); + Local::writeSettings(); + start(true); + } } auto Updater::state() const -> State {