From 733ee5a5c37285c95654692f35596627aebf3311 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 17 Aug 2017 15:30:02 -0400 Subject: [PATCH] Ensured no attempt to put a null track into the cache --- Storage/Disk/Disk.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Storage/Disk/Disk.cpp b/Storage/Disk/Disk.cpp index 5844e1bea..ffd714385 100644 --- a/Storage/Disk/Disk.cpp +++ b/Storage/Disk/Disk.cpp @@ -37,6 +37,7 @@ std::shared_ptr Disk::get_track_at_position(unsigned int head, unsigned i std::lock_guard lock_guard(file_access_mutex_); std::shared_ptr track = get_uncached_track_at_position(head, position); + if(!track) return nullptr; cached_tracks_[address] = track; return track; }