|
@@ -104,7 +104,9 @@ bool DefaultIOSystem::Exists(const char *pFile) const {
|
|
}
|
|
}
|
|
#else
|
|
#else
|
|
struct stat statbuf;
|
|
struct stat statbuf;
|
|
- stat(pFile, &statbuf);
|
|
|
|
|
|
+ if (stat(pFile, &statbuf) != 0) {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
// test for a regular file
|
|
// test for a regular file
|
|
if (!S_ISREG(statbuf.st_mode)) {
|
|
if (!S_ISREG(statbuf.st_mode)) {
|
|
return false;
|
|
return false;
|