shithub: choc

Download patch

ref: de9163ef5383c13c48178a3a6746d820ad14e6f1
parent: 28e726147ae63442a5aeb99724b41d4ba7f0df3e
author: Fabian Greffrath <fabian@greffrath.com>
date: Tue Sep 4 11:32:34 EDT 2018

config: let GetDefaultConfigDir() never return NULL

Fixes #1083, thanks @Pickle

--- a/src/m_config.c
+++ b/src/m_config.c
@@ -2173,7 +2173,10 @@
     char *result;
 
     result = SDL_GetPrefPath("", PACKAGE_TARNAME);
-    return result;
+    if (result != NULL)
+    {
+        return result;
+    }
 #endif /* #ifndef _WIN32 */
     return M_StringDuplicate("");
 }