1
0
Fork 0

Fix NULL issues in drive-related code

This commit is contained in:
krcroft 2020-01-16 14:31:40 -08:00 committed by Patryk Obara
parent df9fac4e61
commit 9d69662001
2 changed files with 2 additions and 5 deletions

View file

@ -876,8 +876,9 @@ bool DOS_Drive_Cache::ReadDir(Bit16u id, char* &result) {
LOG_DEBUG(buffer);
};*/
};
if (SetResult(dirSearch[id], result, dirSearch[id]->nextEntry)) return true;
if (dirSearch[id]) {
if (SetResult(dirSearch[id], result, dirSearch[id]->nextEntry))
return true;
dirSearch[id]->id = MAX_OPENDIRS;
dirSearch[id] = nullptr;
}

View file

@ -753,10 +753,6 @@ fatDrive::fatDrive(const char *sysFilename,
/* Load disk image */
loadedDisk.reset(new imageDisk(diskfile, sysFilename, filesize, is_hdd));
if(!loadedDisk) {
created_successfully = false;
return;
}
if(is_hdd) {
/* Set user specified harddrive parameters */