mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-27 01:31:42 +00:00
Ensured no attempt to put a null track into the cache
This commit is contained in:
parent
fedf5a44a6
commit
733ee5a5c3
@ -37,6 +37,7 @@ std::shared_ptr<Track> Disk::get_track_at_position(unsigned int head, unsigned i
|
||||
|
||||
std::lock_guard<std::mutex> lock_guard(file_access_mutex_);
|
||||
std::shared_ptr<Track> track = get_uncached_track_at_position(head, position);
|
||||
if(!track) return nullptr;
|
||||
cached_tracks_[address] = track;
|
||||
return track;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user