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:
authorBastien Montagne <montagne29@wanadoo.fr>2017-01-04 16:07:38 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-01-04 16:07:38 +0300
commita9163f7d222d9d4949987c9690f44bdb6e43f163 (patch)
tree72c9c0f099dd2d10e25017caeb500e8cf3efadf2 /source/blender/blenkernel/intern/library_remap.c
parent351a9d084f59a6d11be9148830cec86eacb85529 (diff)
Fix (IRC reported) bad handling of Text data-block user count.
Reported on IRC by dfelinto, thanks. Root of the issue was that opening a new text file would create datablock with one user, when Text editor is actually a 'user one' user. This was leaving Text datablocks in inconsitent user count, and generating asserts in BKE_library area. Also changed a weird piece of code related to that extra user thing in main remapping func.
Diffstat (limited to 'source/blender/blenkernel/intern/library_remap.c')
-rw-r--r--source/blender/blenkernel/intern/library_remap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/library_remap.c b/source/blender/blenkernel/intern/library_remap.c
index cc7de92c96a..f76fc628ed0 100644
--- a/source/blender/blenkernel/intern/library_remap.c
+++ b/source/blender/blenkernel/intern/library_remap.c
@@ -522,8 +522,7 @@ void BKE_libblock_remap_locked(
* been incremented for that, we have to decrease once more its user count... unless we had to skip
* some 'user_one' cases. */
if ((old_id->tag & LIB_TAG_EXTRAUSER_SET) && !(id_remap_data.status & ID_REMAP_IS_USER_ONE_SKIPPED)) {
- id_us_min(old_id);
- old_id->tag &= ~LIB_TAG_EXTRAUSER_SET;
+ id_us_clear_real(old_id);
}
BLI_assert(old_id->us - skipped_refcounted >= 0);