From de9163ef5383c13c48178a3a6746d820ad14e6f1 Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Tue, 4 Sep 2018 15:32:34 +0200 Subject: [PATCH] config: let GetDefaultConfigDir() never return NULL Fixes #1083, thanks @Pickle --- src/m_config.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/m_config.c b/src/m_config.c index 7b22d795..c39b9f60 100644 --- a/src/m_config.c +++ b/src/m_config.c @@ -2173,7 +2173,10 @@ static char *GetDefaultConfigDir(void) char *result; result = SDL_GetPrefPath("", PACKAGE_TARNAME); - return result; + if (result != NULL) + { + return result; + } #endif /* #ifndef _WIN32 */ return M_StringDuplicate(""); }