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

@@ -257,9 +257,9 @@ static PyObject *bpy_lib_enter(BPy_Library *self)
ReportList reports;
BKE_reports_init(&reports, RPT_STORE);
BlendFileReadReport bf_reports = {.reports = &reports};
self->blo_handle = BLO_blendhandle_from_file(self->abspath,
&(BlendFileReadReport){.reports = &reports});
self->blo_handle = BLO_blendhandle_from_file(self->abspath, &bf_reports);
if (self->blo_handle == NULL) {
if (BPy_reports_to_error(&reports, PyExc_IOError, true) != -1) {