From e288c5d68ed6f0cc4d4f316eb526f8141eb626ab Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Fri, 2 Aug 2024 18:17:34 +0200 Subject: [PATCH] Update DefaultIOSystem.cpp - closes https://github.com/assimp/assimp/issues/5678 --- code/Common/DefaultIOSystem.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/Common/DefaultIOSystem.cpp b/code/Common/DefaultIOSystem.cpp index e74add55f..ddb5b3b60 100644 --- a/code/Common/DefaultIOSystem.cpp +++ b/code/Common/DefaultIOSystem.cpp @@ -93,6 +93,10 @@ static std::string WideToUtf8(const wchar_t *in) { // ------------------------------------------------------------------------------------------------ // Tests for the existence of a file at the given path. bool DefaultIOSystem::Exists(const char *pFile) const { + if (pFile == nullptr) { + return false; + } + #ifdef _WIN32 struct __stat64 filestat; if (_wstat64(Utf8ToWide(pFile).c_str(), &filestat) != 0) {