mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-29 11:01:57 +00:00
Fix LoadCachedIndex crash if deserialization failed.
This commit is contained in:
parent
7faedfdf00
commit
81594a1497
@ -33,6 +33,7 @@ std::unique_ptr<IndexFile> LoadCachedIndex(Config* config,
|
||||
return nullptr;
|
||||
|
||||
auto result = Deserialize(filename, *file_content, IndexFile::kCurrentVersion);
|
||||
if (result)
|
||||
result->is_loaded_from_cache_ = true;
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user