This was already done in GHOST, but not BKE_appdir_folder_home. Also null check the return value from getpwuid() as it's not guaranteed to be non-null.
This was already done in GHOST, but not BKE_appdir_folder_home. Also null check the return value from getpwuid() as it's not guaranteed to be non-null.