mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/telegramdesktop/tdesktop
synced 2026-09-20 08:03:45 +08:00
Guard the forum teardown media unload against a zero root
Task: 2026/08/20/guard-forum-teardown-unload-against-zero-root
This commit is contained in:
@@ -86,10 +86,12 @@ Forum::~Forum() {
|
||||
auto &changes = session().changes();
|
||||
const auto peerId = _history->peer->id;
|
||||
for (const auto &[rootId, topic] : _topics) {
|
||||
storage.unload(Storage::SharedMediaUnloadThread(
|
||||
peerId,
|
||||
rootId,
|
||||
PeerId()));
|
||||
if (rootId) {
|
||||
storage.unload(Storage::SharedMediaUnloadThread(
|
||||
peerId,
|
||||
rootId,
|
||||
PeerId()));
|
||||
}
|
||||
_history->setForwardDraft(rootId, PeerId(), {});
|
||||
|
||||
const auto raw = topic.get();
|
||||
|
||||
Reference in New Issue
Block a user