mirror of
https://github.com/MaskRay/ccls.git
synced 2025-02-22 00:19:28 +00:00
Fix crash when trying to load cache that does not exist
This commit is contained in:
parent
a97bd9d1c4
commit
d1287f8fc8
@ -953,10 +953,11 @@ bool ImportCachedIndex(IndexerConfig* config,
|
||||
for (auto& dependency_path : cache->dependencies) {
|
||||
std::cerr << "- Got dependency " << dependency_path << std::endl;
|
||||
std::unique_ptr<IndexedFile> cache = LoadCachedIndex(config, dependency_path);
|
||||
if (GetLastModificationTime(cache->path) == cache->last_modification_time)
|
||||
if (cache && GetLastModificationTime(cache->path) == cache->last_modification_time)
|
||||
file_consumer_shared->Mark(cache->path);
|
||||
else
|
||||
needs_reparse = true;
|
||||
if (cache)
|
||||
queue_do_id_map->Enqueue(Index_DoIdMap(std::move(cache)));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user