Fix crash in update checker destruction.

This commit is contained in:
John Preston 2019-01-30 17:58:23 +03:00
parent 4c289fc8fb
commit e09510ea9f
1 changed files with 9 additions and 7 deletions

View File

@ -1129,10 +1129,11 @@ void Updater::check() {
void Updater::handleReady() {
stop();
_action = Action::Ready;
if (!App::quitting()) {
cSetLastUpdateCheck(unixtime());
Local::writeSettings();
}
}
void Updater::handleFailed() {
scheduleNext();
@ -1156,11 +1157,12 @@ void Updater::handleProgress() {
void Updater::scheduleNext() {
stop();
if (!App::quitting()) {
cSetLastUpdateCheck(unixtime());
Local::writeSettings();
start(true);
}
}
auto Updater::state() const -> State {
if (_action == Action::Ready) {