diff options
author | Bastien Montagne <bastien@blender.org> | 2021-06-24 11:53:45 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-06-24 13:10:06 +0300 |
commit | 8cdb99d51c02d5cc60c774c176a43519c046e14c (patch) | |
tree | 0185df926bf3c14905d51a648c1d155cccc4dce1 /source/blender/blenloader/intern/readfile_tempload.c | |
parent | 3a8347f82348ef2f430cdaa8a2e840ad3dba5a71 (diff) |
Fix linking code after own recent commit.
More stupid mistake in recent enhanced reports for file load code,
rB82c17082ba0e left some read-after-free situations.
Diffstat (limited to 'source/blender/blenloader/intern/readfile_tempload.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile_tempload.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/readfile_tempload.c b/source/blender/blenloader/intern/readfile_tempload.c index f440a06acf8..1b1cbb29ef5 100644 --- a/source/blender/blenloader/intern/readfile_tempload.c +++ b/source/blender/blenloader/intern/readfile_tempload.c @@ -36,12 +36,13 @@ TempLibraryContext *BLO_library_temp_load_id(struct Main *real_main, { TempLibraryContext *temp_lib_ctx = MEM_callocN(sizeof(*temp_lib_ctx), __func__); temp_lib_ctx->bmain_base = BKE_main_new(); + temp_lib_ctx->bf_reports.reports = reports; /* Copy the file path so any path remapping is performed properly. */ STRNCPY(temp_lib_ctx->bmain_base->name, real_main->name); - temp_lib_ctx->blendhandle = BLO_blendhandle_from_file( - blend_file_path, &(BlendFileReadReport){.reports = reports}); + temp_lib_ctx->blendhandle = BLO_blendhandle_from_file(blend_file_path, + &temp_lib_ctx->bf_reports); BLO_library_link_params_init( &temp_lib_ctx->liblink_params, temp_lib_ctx->bmain_base, 0, LIB_TAG_TEMP_MAIN); |