Skip to content

Commit

Permalink
Handle exception when deserializing cache file
Browse files Browse the repository at this point in the history
  • Loading branch information
GengGode committed Feb 8, 2024
1 parent 1a2c00f commit 45b5708
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions source/resources/Resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,14 @@ bool load_cache(std::shared_ptr<trackCache::CacheInfo>& cacheInfo)
{
return false;
}
cacheInfo = trackCache::Deserialize(cache_file_path.string());


try
{
cacheInfo = trackCache::Deserialize(cache_file_path.string());
}
catch (...)
{
return false;
}
return true;
}

0 comments on commit 45b5708

Please sign in to comment.