Fix a crash in topic deletion.

This commit is contained in:
John Preston 2022-12-28 12:44:01 +04:00
parent df8176d671
commit 77078f704c
1 changed files with 9 additions and 1 deletions

View File

@ -1749,7 +1749,15 @@ void SessionController::showSection(
}
void SessionController::showBackFromStack(const SectionShow &params) {
content()->showBackFromStack(params);
const auto bad = [&] {
// If we show a currently-being-destroyed topic, then
// skip it and show back one more.
const auto topic = _activeChatEntry.current().key.topic();
return topic && topic->forum()->topicDeleted(topic->rootId());
};
do {
content()->showBackFromStack(params);
} while (bad());
}
void SessionController::showSpecialLayer(