From 33dccbb3812f6508e79d4307041b12eae89d533b Mon Sep 17 00:00:00 2001
From: Wouter Wijsman <[EMAIL REDACTED]>
Date: Wed, 5 Jan 2022 14:00:37 +0100
Subject: [PATCH] Make sure GetPrefPath also works without org
---
src/filesystem/psp/SDL_sysfilesystem.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/filesystem/psp/SDL_sysfilesystem.c b/src/filesystem/psp/SDL_sysfilesystem.c
index e1b5e92bd16..626cdccbb2e 100644
--- a/src/filesystem/psp/SDL_sysfilesystem.c
+++ b/src/filesystem/psp/SDL_sysfilesystem.c
@@ -56,6 +56,9 @@ SDL_GetPrefPath(const char *org, const char *app)
SDL_InvalidParamError("app");
return NULL;
}
+ if(!org) {
+ org = "";
+ }
len = SDL_strlen(base) + SDL_strlen(org) + SDL_strlen(app) + 4;
retval = (char *) SDL_malloc(len);
@@ -71,6 +74,6 @@ SDL_GetPrefPath(const char *org, const char *app)
return retval;
}
-#endif /* SDL_FILESYSTEM_DUMMY || SDL_FILESYSTEM_DISABLED */
+#endif /* SDL_FILESYSTEM_PSP */
-/* vi: set ts=4 sw=4 expandtab: */
\ No newline at end of file
+/* vi: set ts=4 sw=4 expandtab: */