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:
authorSybren A. Stüvel <sybren@stuvel.eu>2018-06-08 14:52:18 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2018-06-08 14:52:53 +0300
commit0c7fc3a9618c2bd410c45953f49f836ee866502c (patch)
tree0d9e5d495df2d3df29d98cfc4edba51b8c1d029b /source/blender/blenkernel/intern/cachefile.c
parentc5904574cbb6d659fbaf6a9b4fdeb2629b1547d1 (diff)
Alembic import: assign cache_file handle to original datablock
Diffstat (limited to 'source/blender/blenkernel/intern/cachefile.c')
-rw-r--r--source/blender/blenkernel/intern/cachefile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/cachefile.c b/source/blender/blenkernel/intern/cachefile.c
index 89c6fad086d..d0cdfd6aeed 100644
--- a/source/blender/blenkernel/intern/cachefile.c
+++ b/source/blender/blenkernel/intern/cachefile.c
@@ -146,6 +146,9 @@ void BKE_cachefile_reload(const Main *bmain, CacheFile *cache_file)
void BKE_cachefile_ensure_handle(const Main *bmain, CacheFile *cache_file)
{
+ /* Assigning to a CoW copy is a bad idea; assign to the original instead. */
+ BLI_assert((cache_file->id.tag & LIB_TAG_COPIED_ON_WRITE) == 0);
+
BLI_spin_lock(&spin);
if (cache_file->handle_mutex == NULL) {
cache_file->handle_mutex = BLI_mutex_alloc();