From 1d1676de2e30ff38dda41fd35ae5302b7f0b79a9 Mon Sep 17 00:00:00 2001 From: RadRussianRus Date: Mon, 19 Apr 2021 00:11:33 +0300 Subject: [PATCH] Fix crash on right clicking emoji button with third column --- Telegram/SourceFiles/history/history_widget.cpp | 2 +- .../history/view/controls/history_view_compose_controls.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index 1ceb4badf..bd6023ec6 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -1018,7 +1018,7 @@ void HistoryWidget::initTabbedSelector() { }); base::install_event_filter(_tabbedSelectorToggle, [=](not_null e) { - if (e->type() == QEvent::ContextMenu && !HoverEmojiPanel()) { + if (e->type() == QEvent::ContextMenu && !HoverEmojiPanel() && _tabbedPanel) { _tabbedPanel->toggleAnimated(); return base::EventFilterResult::Cancel; } diff --git a/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp b/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp index de685264a..275e13d39 100644 --- a/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp +++ b/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp @@ -1498,7 +1498,7 @@ void ComposeControls::initTabbedSelector() { } base::install_event_filter(_tabbedSelectorToggle, [=](not_null e) { - if (e->type() == QEvent::ContextMenu && !HoverEmojiPanel()) { + if (e->type() == QEvent::ContextMenu && !HoverEmojiPanel() && _tabbedPanel) { _tabbedPanel->toggleAnimated(); return base::EventFilterResult::Cancel; }