Update DefaultIOSystem.cpp (#5697)
- closes https://github.com/assimp/assimp/issues/5678pull/5695/head^2
parent
e63d3ed8e7
commit
a37d748c17
|
@ -93,6 +93,10 @@ static std::string WideToUtf8(const wchar_t *in) {
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Tests for the existence of a file at the given path.
|
// Tests for the existence of a file at the given path.
|
||||||
bool DefaultIOSystem::Exists(const char *pFile) const {
|
bool DefaultIOSystem::Exists(const char *pFile) const {
|
||||||
|
if (pFile == nullptr) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
struct __stat64 filestat;
|
struct __stat64 filestat;
|
||||||
if (_wstat64(Utf8ToWide(pFile).c_str(), &filestat) != 0) {
|
if (_wstat64(Utf8ToWide(pFile).c_str(), &filestat) != 0) {
|
||||||
|
|
Loading…
Reference in New Issue