This commit is contained in:
andrew (from workstation) 2020-05-17 12:34:14 +02:00
parent 18fbab5831
commit 8077faed68

View File

@ -3716,13 +3716,14 @@ void FileManager::memory_cleanup() {
/* DESTROY ASSOCIATED QUERIES */
for (auto &query_id : queries_container_.ids()) {
auto query = queries_container_.get(query_id);
if (file_id.get() == query->file_id_.get()) {
if (query != nullptr && file_id.get() == query->file_id_.get()) {
on_error(query_id, Status::Error(400, "FILE_DOWNLOAD_RESTART"));
}
}
/* DESTROY ASSOCIATED NODE */
file_nodes_[file_id_info_[file_id.get()].node_id_] = nullptr;
auto file_node_id = file_id_info_[file_id.get()].node_id_;
if (file_node_id != 0) { file_nodes_[file_node_id] = nullptr; }
/* DESTROY ASSOCIATED FILE */
empty_file_ids_.push_back(file_id.get());
@ -3732,7 +3733,7 @@ void FileManager::memory_cleanup() {
/* DESTROY MAIN QUERY */
for (auto &query_id : queries_container_.ids()) {
auto query = queries_container_.get(query_id);
if (((int32) i) == query->file_id_.get()) {
if (query != nullptr && ((int32) i) == query->file_id_.get()) {
on_error(query_id, Status::Error(400, "FILE_DOWNLOAD_RESTART"));
}
}