Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2022-04-29 17:52:59 +0300
committerBastien Montagne <bastien@blender.org>2022-04-29 18:57:46 +0300
commit3c7a6718ddc52fbf2a6a8d57822007738699fe96 (patch)
tree2181ba80c896ea19625d8af43431ee137d2a02e3 /source/blender/blenkernel/BKE_blendfile_link_append.h
parent4d464a946a061cdcd6bca3b7d41de01eb3fc33d6 (diff)
Fix T95480: Crash when relocating libraries in some cases.
While code deleting old (relocated to new ones) IDs would work fine in typical cases, it would fail badly in others, when e.g. drivers would create 'reversed' dependency from the obdata ID to the object ID. This commit uses a less efficient, but much safer method. It also ensures no relocated old IDs is left over in the file (previous version could easily leave some old IDs from the old library until a full save/reload cycle happened).
Diffstat (limited to 'source/blender/blenkernel/BKE_blendfile_link_append.h')
-rw-r--r--source/blender/blenkernel/BKE_blendfile_link_append.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_blendfile_link_append.h b/source/blender/blenkernel/BKE_blendfile_link_append.h
index b70f2c2563a..bd00ed51d99 100644
--- a/source/blender/blenkernel/BKE_blendfile_link_append.h
+++ b/source/blender/blenkernel/BKE_blendfile_link_append.h
@@ -197,6 +197,9 @@ void BKE_blendfile_link(struct BlendfileLinkAppendContext *lapp_context,
* - Add all IDs to search for to `lapp_context`.
* - Mark which libraries should be considered for each ID.
* - Call this function.
+ *
+ * NOTE: content of `lapp_context` after execution of that function should not be assumed valid
+ * anymore, and should immediately be freed.
*/
void BKE_blendfile_library_relocate(struct BlendfileLinkAppendContext *lapp_context,
struct ReportList *reports,