From 49646282910aeef73db44943b88df06f0957422c Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 4 Dec 2014 16:44:22 +0100 Subject: [PATCH] + check if file handle is valid in FileInfo::isFile --- src/Base/FileInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Base/FileInfo.cpp b/src/Base/FileInfo.cpp index 4a0cee5f5..521bd8d8b 100644 --- a/src/Base/FileInfo.cpp +++ b/src/Base/FileInfo.cpp @@ -325,7 +325,7 @@ bool FileInfo::isFile () const std::wstring wstr = toStdWString(); FILE* fd = _wfopen(wstr.c_str(), L"rb"); bool ok = (fd != 0); - fclose(fd); + if (fd) fclose(fd); return ok; } #else