mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix possible crash when update is ready.
Regression was introduced in 9a0be43ef5
.
This commit is contained in:
parent
d6e03c3e48
commit
a5425042cf
1 changed files with 9 additions and 3 deletions
|
@ -595,7 +595,9 @@ void Widget::checkUpdateStatus() {
|
||||||
|
|
||||||
using Checker = Core::UpdateChecker;
|
using Checker = Core::UpdateChecker;
|
||||||
if (Checker().state() == Checker::State::Ready) {
|
if (Checker().state() == Checker::State::Ready) {
|
||||||
if (_updateTelegram) return;
|
if (_updateTelegram) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
_updateTelegram.create(
|
_updateTelegram.create(
|
||||||
this,
|
this,
|
||||||
tr::lng_update_telegram(tr::now),
|
tr::lng_update_telegram(tr::now),
|
||||||
|
@ -607,9 +609,13 @@ void Widget::checkUpdateStatus() {
|
||||||
Core::checkReadyUpdate();
|
Core::checkReadyUpdate();
|
||||||
App::restart();
|
App::restart();
|
||||||
});
|
});
|
||||||
_connecting->raise();
|
if (_connecting) {
|
||||||
|
_connecting->raise();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!_updateTelegram) return;
|
if (!_updateTelegram) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
_updateTelegram.destroy();
|
_updateTelegram.destroy();
|
||||||
}
|
}
|
||||||
updateControlsGeometry();
|
updateControlsGeometry();
|
||||||
|
|
Loading…
Add table
Reference in a new issue