diff --git a/repertory/librepertory/src/file_manager/file_manager.cpp b/repertory/librepertory/src/file_manager/file_manager.cpp index 44f13ce8..85e4aefe 100644 --- a/repertory/librepertory/src/file_manager/file_manager.cpp +++ b/repertory/librepertory/src/file_manager/file_manager.cpp @@ -187,7 +187,7 @@ auto file_manager::evict_file(const std::string &api_path) -> bool { open_file_lookup_.erase(api_path); open_lock.unlock(); - auto allocated = closeable_file->get_allocated(); + auto allocated = closeable_file ? closeable_file->get_allocated() : true; closeable_file.reset(); auto removed = remove_source_and_shrink_cache(api_path, source_path, fsi.size,