Fix crash when "HOME" environment variable isn't defined

Accessing the default directory in the file selector
would crash if HOME was undefined.

Add BKE_appdir_folder_default_or_root which never returns NULL.
This commit is contained in:
2021-11-01 13:09:02 +11:00
parent d4d38e8a34
commit a0633e2484
6 changed files with 41 additions and 14 deletions

View File

@@ -193,7 +193,7 @@ bool BLI_windows_register_blend_extension(const bool background)
return true;
}
void BLI_windows_get_default_root_dir(char *root)
void BLI_windows_get_default_root_dir(char root[4])
{
char str[MAX_PATH + 1];