diff --git a/Telegram/SourceFiles/data/data_forum.cpp b/Telegram/SourceFiles/data/data_forum.cpp index 35334b8c12..f2eb20ae44 100644 --- a/Telegram/SourceFiles/data/data_forum.cpp +++ b/Telegram/SourceFiles/data/data_forum.cpp @@ -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();