Prevent closedir from being called on a NULL pointer.

This commit is contained in:
Pieter Hulshoff 2017-01-08 21:07:08 +01:00
parent 8f77348251
commit e8af81df71

View File

@ -440,6 +440,7 @@ void CollectionInfoBuilder::ImportRomDirectory(std::string path, CollectionInfo
if (dp == NULL) if (dp == NULL)
{ {
Logger::write(Logger::ZONE_INFO, "CollectionInfoBuilder", "Could not read directory \"" + path + "\". Ignore if this is a menu."); Logger::write(Logger::ZONE_INFO, "CollectionInfoBuilder", "Could not read directory \"" + path + "\". Ignore if this is a menu.");
return;
} }
while(dp != NULL && (dirp = readdir(dp)) != NULL) while(dp != NULL && (dirp = readdir(dp)) != NULL)