[Bf-blender-cvs] [2a771cbc58f] blender2.8: Alembic: Moved a BLI_assert
Sybren A. Stüvel
noreply at git.blender.org
Fri Jun 8 15:53:30 CEST 2018
Commit: 2a771cbc58f3b5406e7f4059d6cd91164bfb3a75
Author: Sybren A. Stüvel
Date: Fri Jun 8 15:42:51 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB2a771cbc58f3b5406e7f4059d6cd91164bfb3a75
Alembic: Moved a BLI_assert
The assert should only be triggered when assigning a pointer, and not
simply when checking the pointer.
===================================================================
M source/blender/blenkernel/intern/cachefile.c
===================================================================
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);
}
More information about the Bf-blender-cvs
mailing list