diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2018-06-08 16:42:51 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2018-06-08 16:51:49 +0300 |
commit | 2a771cbc58f3b5406e7f4059d6cd91164bfb3a75 (patch) | |
tree | f6728a1565a7eaf3933851e5753d076d4ab5c4b1 /source/blender/blenkernel/intern/cachefile.c | |
parent | 335e030753b5b02611ec81bfb3c3550820706fb3 (diff) |
Alembic: Moved a BLI_assert
The assert should only be triggered when assigning a pointer, and not
simply when checking the pointer.
Diffstat (limited to 'source/blender/blenkernel/intern/cachefile.c')
-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); } |