Correct last commit (where_is_temp refactor)

Changes didn't account the case when mkdtemp failed.
Previously the copying the string wasn't needed in this case.
This commit is contained in:
Campbell Barton 2020-10-05 09:40:01 +11:00
parent ffa7152626
commit 659f81f1cb
Notes: blender-bot 2024-02-28 15:45:49 +01:00
Referenced by issue #81473, Render artefacts with GPU / motion blur
1 changed files with 2 additions and 1 deletions

View File

@ -1087,7 +1087,8 @@ static void tempdir_session_create(char *tempdir_session,
CLOG_WARN(&LOG,
"Could not generate a temp file name for '%s', falling back to '%s'",
tmp_name,
tempdir_session);
tempdir);
BLI_strncpy(tempdir_session, tmp_name, tempdir_session_len);
}
MEM_freeN(tmp_name);