1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-08-15 14:27:29 +00:00

Merge pull request #385 from TomHarte/OricHFE

Corrects nullptr references in the CPC static analyser.
This commit is contained in:
Thomas Harte
2018-03-23 18:40:13 -04:00
committed by GitHub

View File

@@ -223,13 +223,13 @@ void Analyser::Static::AmstradCPC::AddTargets(const Media &media, std::vector<st
} }
// Failing that check for a boot sector. // Failing that check for a boot sector.
if(CheckBootSector(target->media.disks.front(), target)) { if(CheckBootSector(disk, target)) {
target->media.disks.push_back(disk); target->media.disks.push_back(disk);
continue; continue;
} }
// Failing that check for a system catalogue. // Failing that check for a system catalogue.
std::unique_ptr<Storage::Disk::CPM::Catalogue> system_catalogue = Storage::Disk::CPM::GetCatalogue(target->media.disks.front(), system_format); std::unique_ptr<Storage::Disk::CPM::Catalogue> system_catalogue = Storage::Disk::CPM::GetCatalogue(disk, system_format);
if(system_catalogue) { if(system_catalogue) {
InspectCatalogue(*system_catalogue, target); InspectCatalogue(*system_catalogue, target);
target->media.disks.push_back(disk); target->media.disks.push_back(disk);