mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-04 16:35:44 +00:00
Fix stack overflow in passcode lock check.
A regression was introduced in e209737b1a
.
We call MainWindow::doWeReadMentions() in the history paintEvent,
that calls Auth().checkAutoLock() and may start passcode locking.
Passcode locking starts animation and grabs the window content,
calling history paintEvent() which leads to deadlock.
Now we call Auth().checkAutoLock() asyncronously.
This commit is contained in:
@@ -4406,7 +4406,7 @@ MainWidget::~MainWidget() {
|
||||
|
||||
void MainWidget::updateOnline(bool gotOtherOffline) {
|
||||
if (this != App::main()) return;
|
||||
Auth().checkAutoLock();
|
||||
InvokeQueued(this, [] { Auth().checkAutoLock(); });
|
||||
|
||||
bool isOnline = App::wnd()->isActive();
|
||||
int updateIn = Global::OnlineUpdatePeriod();
|
||||
|
Reference in New Issue
Block a user