diff --git a/Telegram/SourceFiles/dialogs/dialogs_top_bar_suggestion.cpp b/Telegram/SourceFiles/dialogs/dialogs_top_bar_suggestion.cpp index 7cf5dff701..0b5a5e7e82 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_top_bar_suggestion.cpp +++ b/Telegram/SourceFiles/dialogs/dialogs_top_bar_suggestion.cpp @@ -359,7 +359,7 @@ rpl::producer*> TopBarSuggestionValue( fake->moveToLeft( leftPadding, (s.height() - fake->height()) / 2); - }, content->lifetime()); + }, fake->lifetime()); content->setLeftPadding(fake->width() + leftPadding); } diff --git a/Telegram/SourceFiles/dialogs/ui/dialogs_top_bar_suggestion_content.cpp b/Telegram/SourceFiles/dialogs/ui/dialogs_top_bar_suggestion_content.cpp index 263a1ccb49..c39130c855 100644 --- a/Telegram/SourceFiles/dialogs/ui/dialogs_top_bar_suggestion_content.cpp +++ b/Telegram/SourceFiles/dialogs/ui/dialogs_top_bar_suggestion_content.cpp @@ -194,6 +194,7 @@ rpl::producer TopBarSuggestionContent::desiredHeightValue() const { } void TopBarSuggestionContent::setHideCallback(Fn hideCallback) { + Expects(_rightHide != nullptr); _rightHide->setClickedCallback(std::move(hideCallback)); }