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(""); }