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.
This commit is contained in:
2021-06-24 10:53:45 +02:00
parent 3a8347f823
commit 8cdb99d51c
11 changed files with 38 additions and 30 deletions

View File

@@ -87,7 +87,8 @@ bool BKE_copybuffer_read(Main *bmain_dst,
ReportList *reports,
const uint64_t id_types_mask)
{
BlendHandle *bh = BLO_blendhandle_from_file(libname, &(BlendFileReadReport){.reports = reports});
BlendFileReadReport bf_reports = {.reports = reports};
BlendHandle *bh = BLO_blendhandle_from_file(libname, &bf_reports);
if (bh == NULL) {
/* Error reports will have been made by BLO_blendhandle_from_file(). */
return false;
@@ -133,7 +134,8 @@ int BKE_copybuffer_paste(bContext *C,
BlendHandle *bh;
const int id_tag_extra = 0;
bh = BLO_blendhandle_from_file(libname, &(BlendFileReadReport){.reports = reports});
BlendFileReadReport bf_reports = {.reports = reports};
bh = BLO_blendhandle_from_file(libname, &bf_reports);
if (bh == NULL) {
/* error reports will have been made by BLO_blendhandle_from_file() */