mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-01 20:11:07 +00:00
Fix possible crash when update is ready.
Regression was introduced in 9a0be43ef5
.
This commit is contained in:
parent
d6e03c3e48
commit
a5425042cf
@ -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…
Reference in New Issue
Block a user