From dcb1315d539261f6859577915372513355253eb5 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 18 Jan 2023 10:25:56 +0400 Subject: [PATCH] Fix assertion violation in a new window init. Fixes #24620. In MainWidget updateControlsGeometry accesses SessionController and itself through SessionController::content, which is not filled in the MainWidget constructor yet, so ignore initial updates. --- Telegram/SourceFiles/mainwidget.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 9e96d58f1..31e75c60e 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -2123,6 +2123,9 @@ void MainWidget::resizeEvent(QResizeEvent *e) { } void MainWidget::updateControlsGeometry() { + if (!width()) { + return; + } updateWindowAdaptiveLayout(); if (_dialogs) { if (Core::App().settings().dialogsWidthRatio() > 0) {