diff options
author | Bastien Montagne <bastien@blender.org> | 2022-07-21 17:36:06 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-07-21 17:39:07 +0300 |
commit | b0f9639733500e7c3deedc36c2ef6b9685a756ee (patch) | |
tree | c8f8d992e99b8c8d0458c68be09e71b165a066c3 /source/blender/blenkernel | |
parent | 396b7a6ec8fdcc7e8f14ba6694e24093744622f6 (diff) |
Fix crash due to improper handling of new library runtime name_map data on read/write.
Code handling read/write of libraries is still particular... but trying
to call `library_runtime_reset` on a random address at readtime was an
obvious mistake I should have caught during review :(
Regression from rB7f8d05131a77.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index fee4cae2701..dd58c9cc4fe 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -73,18 +73,10 @@ static void library_foreach_path(ID *id, BPathForeachPathData *bpath_data) } } -static void library_blend_write(struct BlendWriter *UNUSED(writer), - ID *id, - const void *UNUSED(id_address)) -{ - Library *lib = (Library *)id; - library_runtime_reset(lib); -} - static void library_blend_read_data(struct BlendDataReader *UNUSED(reader), ID *id) { Library *lib = (Library *)id; - library_runtime_reset(lib); + lib->runtime.name_map = NULL; } IDTypeInfo IDType_ID_LI = { @@ -107,7 +99,7 @@ IDTypeInfo IDType_ID_LI = { .foreach_path = library_foreach_path, .owner_get = NULL, - .blend_write = library_blend_write, + .blend_write = NULL, .blend_read_data = library_blend_read_data, .blend_read_lib = NULL, .blend_read_expand = NULL, |