summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/utils/physfsrwops.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/utils/physfsrwops.cpp b/src/utils/physfsrwops.cpp
index e755ea353..67376d3dc 100644
--- a/src/utils/physfsrwops.cpp
+++ b/src/utils/physfsrwops.cpp
@@ -179,6 +179,10 @@ SDL_RWops *PHYSFSRWOPS_openRead(const char *fname)
{
if (!fname || !*fname)
return nullptr;
+#ifdef __APPLE__
+ if (!PHYSFS_exists(fname))
+ return nullptr;
+#endif
return create_rwops(PHYSFS_openRead(fname));
} /* PHYSFSRWOPS_openRead */
@@ -186,6 +190,10 @@ SDL_RWops *PHYSFSRWOPS_openWrite(const char *fname)
{
if (!fname || !*fname)
return nullptr;
+#ifdef __APPLE__
+ if (!PHYSFS_exists(fname))
+ return nullptr;
+#endif
return create_rwops(PHYSFS_openWrite(fname));
} /* PHYSFSRWOPS_openWrite */
@@ -193,6 +201,10 @@ SDL_RWops *PHYSFSRWOPS_openAppend(const char *fname)
{
if (!fname || !*fname)
return nullptr;
+#ifdef __APPLE__
+ if (!PHYSFS_exists(fname))
+ return nullptr;
+#endif
return create_rwops(PHYSFS_openAppend(fname));
} /* PHYSFSRWOPS_openAppend */