From 8cdb99d51c02d5cc60c774c176a43519c046e14c Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 24 Jun 2021 10:53:45 +0200 Subject: 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. --- source/blender/blenkernel/intern/blender_copybuffer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel/intern/blender_copybuffer.c') diff --git a/source/blender/blenkernel/intern/blender_copybuffer.c b/source/blender/blenkernel/intern/blender_copybuffer.c index c8fedc086b8..9c9f898afef 100644 --- a/source/blender/blenkernel/intern/blender_copybuffer.c +++ b/source/blender/blenkernel/intern/blender_copybuffer.c @@ -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() */ -- cgit v1.2.3