diff options
-rw-r--r-- | source/blender/blenkernel/intern/cachefile.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/cachefile.c b/source/blender/blenkernel/intern/cachefile.c index 58770b37147..74c0dca6279 100644 --- a/source/blender/blenkernel/intern/cachefile.c +++ b/source/blender/blenkernel/intern/cachefile.c @@ -159,9 +159,6 @@ 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(); @@ -171,6 +168,8 @@ void BKE_cachefile_ensure_handle(const Main *bmain, CacheFile *cache_file) BLI_mutex_lock(cache_file->handle_mutex); if (cache_file->handle == NULL) { + /* 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); BKE_cachefile_reload(bmain, cache_file); } |