mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +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;
|
||||
if (Checker().state() == Checker::State::Ready) {
|
||||
if (_updateTelegram) return;
|
||||
if (_updateTelegram) {
|
||||
return;
|
||||
}
|
||||
_updateTelegram.create(
|
||||
this,
|
||||
tr::lng_update_telegram(tr::now),
|
||||
|
@ -607,9 +609,13 @@ void Widget::checkUpdateStatus() {
|
|||
Core::checkReadyUpdate();
|
||||
App::restart();
|
||||
});
|
||||
_connecting->raise();
|
||||
if (_connecting) {
|
||||
_connecting->raise();
|
||||
}
|
||||
} else {
|
||||
if (!_updateTelegram) return;
|
||||
if (!_updateTelegram) {
|
||||
return;
|
||||
}
|
||||
_updateTelegram.destroy();
|
||||
}
|
||||
updateControlsGeometry();
|
||||
|
|
Loading…
Add table
Reference in a new issue