ngage: SDL_GetPrefPath allows a NULL org parameter.

Reference Issue #13322.
This commit is contained in:
Ryan C. Gordon
2025-07-05 12:19:21 -04:00
parent ecdc6f2adb
commit 343ad3eddd

View File

@@ -32,10 +32,10 @@ char *SDL_SYS_GetBasePath(void)
char *SDL_SYS_GetPrefPath(const char *org, const char *app)
{
char *pref_path;
if (SDL_asprintf(&pref_path, "C:/System/Apps/%s/%s/", org, app) < 0)
char *pref_path = NULL;
if (SDL_asprintf(&pref_path, "C:/System/Apps/%s/%s/", org ? org : "SDL_App", app) < 0) {
return NULL;
else
}
return pref_path;
}