From 10ced1984143b3bc60f94e8b498830f322ae0640 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 30 Jun 2020 17:23:21 +0400 Subject: [PATCH] Fix crash in redundant checkStartUrl call. --- Telegram/SourceFiles/core/local_url_handlers.cpp | 15 ++++++--------- Telegram/SourceFiles/mainwidget.cpp | 2 -- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/Telegram/SourceFiles/core/local_url_handlers.cpp b/Telegram/SourceFiles/core/local_url_handlers.cpp index e1d2f4ac03..0958c49950 100644 --- a/Telegram/SourceFiles/core/local_url_handlers.cpp +++ b/Telegram/SourceFiles/core/local_url_handlers.cpp @@ -298,15 +298,12 @@ bool ResolveUsername( post = ShowAtGameShareMsgId; } const auto clickFromMessageId = context.value(); - if (const auto controller = App::wnd()->sessionController()) { - controller->content()->openPeerByName( - domain, - post, - startToken, - clickFromMessageId); - return true; - } - return false; + controller->content()->openPeerByName( + domain, + post, + startToken, + clickFromMessageId); + return true; } bool ResolvePrivatePost( diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index cb4b08f3b3..6f27ebba4c 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -370,8 +370,6 @@ MainWidget::MainWidget( cSetOtherOnline(0); _history->start(); - - Core::App().checkStartUrl(); } MainWidget::~MainWidget() = default;