Fix #112068: Crash when loading converted curves #112366

Merged
Philipp Oeser merged 1 commits from filedescriptor/blender:blender-3.6-fix-112068 into blender-v3.6-release 2023-09-14 13:41:26 +02:00

1 Commits

Author SHA1 Message Date
Falk David f9d895e6b7 Fix #112068: Crash when loading converted curves
buildbot/vexp-code-patch-coordinator Build done. Details
In 2788fa915b the `CurvesGeometry::blend_write` and `CurvesGeometry::blend_read` functions were added. Unfortunately, the commit also altered the writing logic and introduced a bug where loading a file with a converted `Curves` object would crash. See #112068.

This PR fixes the issue by making sure that `CustomData_blend_write_prepare` is called before `BKE_id_blend_write`, which is the root cause of the crash that happens on load.

The  `CurvesGeometry::blend_write` function is split into  `CurvesGeometry::blend_write_prepare` and `CurvesGeometry::blend_write`.

Pull Request: #112280
2023-09-14 11:33:54 +02:00