1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-23 03:32:32 +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
commit 2118b9c0cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -223,13 +223,13 @@ void Analyser::Static::AmstradCPC::AddTargets(const Media &media, std::vector<st
}
// Failing that check for a boot sector.
if(CheckBootSector(target->media.disks.front(), target)) {
if(CheckBootSector(disk, target)) {
target->media.disks.push_back(disk);
continue;
}
// 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) {
InspectCatalogue(*system_catalogue, target);
target->media.disks.push_back(disk);