FileReferenceManager existance check
This commit is contained in:
parent
35fe9a1409
commit
22192cda3c
@ -366,10 +366,13 @@ void FileReferenceManager::reload_photo(PhotoSizeSource source, Promise<Unit> pr
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FileReferenceManager::memory_cleanup(FileId file_id) {
|
void FileReferenceManager::memory_cleanup(FileId file_id) {
|
||||||
auto &node = nodes_[file_id];
|
auto find_node = nodes_.find(file_id);
|
||||||
node.query.reset();
|
if (find_node != nodes_.end()) {
|
||||||
node.file_source_ids.reset_position();
|
auto &node = find_node->second;
|
||||||
nodes_.erase(file_id);
|
node.query.reset();
|
||||||
|
node.file_source_ids.reset_position();
|
||||||
|
nodes_.erase(file_id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace td
|
} // namespace td
|
||||||
|
Loading…
Reference in New Issue
Block a user