From e8af81df7130082f7ec00c68e339429cf6906841 Mon Sep 17 00:00:00 2001 From: Pieter Hulshoff Date: Sun, 8 Jan 2017 21:07:08 +0100 Subject: [PATCH] Prevent closedir from being called on a NULL pointer. --- RetroFE/Source/Collection/CollectionInfoBuilder.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/RetroFE/Source/Collection/CollectionInfoBuilder.cpp b/RetroFE/Source/Collection/CollectionInfoBuilder.cpp index aebab9e..fe70cb5 100644 --- a/RetroFE/Source/Collection/CollectionInfoBuilder.cpp +++ b/RetroFE/Source/Collection/CollectionInfoBuilder.cpp @@ -440,6 +440,7 @@ void CollectionInfoBuilder::ImportRomDirectory(std::string path, CollectionInfo if (dp == NULL) { 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)