From e676d0bdcf7768ae89676d87747644fa9a6ad99d Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sun, 26 Apr 2015 02:29:53 +0300 Subject: [PATCH] Bugfix --- Utilities/File.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utilities/File.cpp b/Utilities/File.cpp index cb046869aa..f922c4e732 100644 --- a/Utilities/File.cpp +++ b/Utilities/File.cpp @@ -755,7 +755,7 @@ bool fs::dir::get_next(std::string& name, stat_t& info) const auto found = ::readdir((DIR*)m_dd); struct stat64 file_info; - if (fstatat64(::dirfd((DIR*)m_dd), found->d_name, &file_info, 0) < 0) + if (!found || fstatat64(::dirfd((DIR*)m_dd), found->d_name, &file_info, 0) < 0) { return false; }