From fbdc8d5bca8c6fb9e1b059884bb31b39e9cc088d Mon Sep 17 00:00:00 2001 From: Mark Nefedov Date: Fri, 8 May 2020 22:08:52 +0300 Subject: If 'Exists' true, pFile is not nullptr. --- Platforms/Linux/src/LinuxFileSystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Platforms/Linux/src/LinuxFileSystem.cpp b/Platforms/Linux/src/LinuxFileSystem.cpp index b13f5686..54bc40c5 100644 --- a/Platforms/Linux/src/LinuxFileSystem.cpp +++ b/Platforms/Linux/src/LinuxFileSystem.cpp @@ -51,7 +51,7 @@ bool LinuxFileSystem::FileExists(const Diligent::Char* strFilePath) const auto& Path = DummyFile.GetPath(); // This is necessary to correct slashes FILE* pFile = fopen(Path.c_str(), "r"); bool Exists = (pFile != nullptr); - if (Exists && pFile) + if (Exists) fclose(pFile); return Exists; } -- cgit v1.2.3