Fix NULL issues in drive-related code
This commit is contained in:
parent
df9fac4e61
commit
9d69662001
2 changed files with 2 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Add table
Reference in a new issue